日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux stop函数,perfmonctl()函数 Unix/Linux

發(fā)布時間:2024/9/19 linux 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux stop函数,perfmonctl()函数 Unix/Linux 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

perfmonctl -接口PMU

內容簡介

#include

#include

long perfmonctl(intfd, intcmd, void *arg, intnarg);

描述

perfmonctlsystem call provides an interface to PMU (performance monitoring unit). PMU consists of PMD (performance monitoring data) registers and PMC (performance monitoring control) registers, where are gathered the hardware statistic.

perfmonctl?will apply a function?cmd?to input arguments?arg.?The number of arguments is defined by input variable?narg.?fd?specifies the perfmon context to operate on.

實現(xiàn)的?cmd命令是:

標簽

描述

PFM_CREATE_CONTEXT

set up a context

perfmonctl(intfd, PFM_CREATE_CONTEXT , pfarg_context_t *ctxt,1);

The?fd?parameter is ignored. A new context is created as specified in?ctxtand its file descriptor is returned in?ctxt->ctx_fd.

The file descriptor, apart from passing it to?perfmonctl, can be used to read event notifications (type?pfm_msg_t) using the?read(2) system call. Both?select(2) and?poll(2) can be used to wait for event notifications.

The context can be destroyed using the?close(2) system call.

PFM_WRITE_PMCS

set PMC registers

perfmonctl(intfd, PFM_WRITE_PMCS , pfarg_pmc_t *pmcs,n);

PFM_WRITE_PMDS

set PMD registers

perfmonctl(intfd, PFM_WRITE_PMDS , pfarg_pmd_t *pmds,n);

PFM_READ_PMDS

read PMD registers

perfmonctl(intfd, PFM_READ_PMDS , pfarg_pmd_t *pmds,n);

PFM_START

start monitoring

perfmonctl(intfd,PFM_START,arg,1);

perfmonctl(intfd,PFM_START,NULL,0);

PFM_STOP

stop monitoring

perfmonctl(intfd,PFM_START,NULL,0);

PFM_LOAD_CONTEXT

attach the context to a thread

perfmonctl(intfd, PFM_LOAD_CONTEXT ,pfarg_load_t *largs,1);

PFM_UNLOAD_CONTEXT

detach the context from a thread

perfmonctl(intfd,PFM_UNLOAD_CONTEXT,NULL,0);

PFM_RESTART

restart monitoring after recieving an overflow notification

perfmonctl(intfd,PFM_RESTART,NULL,0);

PFM_CREATE_EVTSETS

create or modify event sets

perfmonctl(intfd,PFM_CREATE_EVTSETS,pfarg_setdesc_t*desc,n);

PFM_DELETE_EVTSETS

delete event sets

perfmonctl(intfd,PFM_DELETE_EVTSET,pfarg_setdesc_t*desc,n);

PFM_GETINFO_EVTSETS

get information about event sets

perfmonctl(intfd,PFM_GETINFO_EVTSETS,pfarg_setinfo_t*info,n);

返回值

performctlreturns zero when the operation is successful. On error -1 is returned and an error code is set inerrno.

可用性

This syscall is implemented only on the IA-64 architecture since kernel 2.6.

另請參閱

¥ 我要打賞

糾錯/補充

收藏

加QQ群啦,易百教程官方技術學習群

注意:建議每個人選自己的技術方向加群,同一個QQ最多限加 3 個群。

總結

以上是生活随笔為你收集整理的linux stop函数,perfmonctl()函数 Unix/Linux的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。