草庐IT

kprobe_events

全部标签

linux - 如何更改 perf_event_open 最大采样率

我正在使用perf_event_open获取样本。我试着让每个人都说到点子上。但是perf_event_open不够快。我尝试使用以下命令更改采样率:echo10000000>/proc/sys/kernel/perf_event_max_sample_rate但是看起来我设置的值太大了。运行我的代码后,perf_event_max_sample_rate变回较低的值,例如12500。当我尝试更改更大的值时,例如20000000、50000000等,采样速度不会随着我更改的值而增加。有什么方法可以更快地改变perf_event_open采样速度吗? 最佳答案

linux - 使用 ftrace 和 kprobes(通过使用虚拟地址转换)捕获用户空间程序集?

为冗长的帖子道歉,我无法以较短的方式制定它。另外,也许这更适合Unix和LinuxStackExchange,但我会先在这里尝试,因为有一个ftrace标签。无论如何-我想观察用户程序的机器指令是否在完整function_graph的上下文中执行使用ftrace捕获.一个问题是我需要这个用于较旧的内核:$uname-aLinuxmypc2.6.38-16-generic#67-UbuntuSMPThuSep618:00:43UTC2012i686i686i386GNU/Linux...而在这个版本中,没有UPROBES-其中,如Uprobesin3.5[LWN.net]笔记,应该能够做

linux - 使用 ftrace 和 kprobes(通过使用虚拟地址转换)捕获用户空间程序集?

为冗长的帖子道歉,我无法以较短的方式制定它。另外,也许这更适合Unix和LinuxStackExchange,但我会先在这里尝试,因为有一个ftrace标签。无论如何-我想观察用户程序的机器指令是否在完整function_graph的上下文中执行使用ftrace捕获.一个问题是我需要这个用于较旧的内核:$uname-aLinuxmypc2.6.38-16-generic#67-UbuntuSMPThuSep618:00:43UTC2012i686i686i386GNU/Linux...而在这个版本中,没有UPROBES-其中,如Uprobesin3.5[LWN.net]笔记,应该能够做

linux - 无法从/dev/input/event* 获取鼠标 move 事件

使用evtest时无法获取鼠标move事件测试输入事件的工具。我只得到三个鼠标事件:leftclickevent:type=EV_KEY,code=272(LeftBtn),value=1/0rightclickevent:type=EV_KEY,code=273(RightBtn),value=1/0mousewheelevent:type=EV_REL,code=8(Wheel),value=-1没有鼠标move事件。那么我的鼠标move事件在哪里以及如何捕获它?ps:在安装了virtualBox-addition的VirtualBox-4中的Ubuntu11.04和Gentoo上

linux - 无法从/dev/input/event* 获取鼠标 move 事件

使用evtest时无法获取鼠标move事件测试输入事件的工具。我只得到三个鼠标事件:leftclickevent:type=EV_KEY,code=272(LeftBtn),value=1/0rightclickevent:type=EV_KEY,code=273(RightBtn),value=1/0mousewheelevent:type=EV_REL,code=8(Wheel),value=-1没有鼠标move事件。那么我的鼠标move事件在哪里以及如何捕获它?ps:在安装了virtualBox-addition的VirtualBox-4中的Ubuntu11.04和Gentoo上

linux - epoll_event结构体(epoll)中参数的意义

我正在使用epoll_ctl()和epoll_wait()系统调用。intepoll_ctl(intepfd,intop,intfd,structepoll_event*event);intepoll_wait(intepfd,structepoll_event*events,intmaxevents,inttimeout);structepoll_event{uint32_tevents;/*epollevents(bitmask)*/epoll_data_tdata;/*Userdata*/};typedefunionepoll_data{entercodehere`void*pt

linux - epoll_event结构体(epoll)中参数的意义

我正在使用epoll_ctl()和epoll_wait()系统调用。intepoll_ctl(intepfd,intop,intfd,structepoll_event*event);intepoll_wait(intepfd,structepoll_event*events,intmaxevents,inttimeout);structepoll_event{uint32_tevents;/*epollevents(bitmask)*/epoll_data_tdata;/*Userdata*/};typedefunionepoll_data{entercodehere`void*pt

linux - 使用 kprobes 获取函数参数

我已经在一个函数上放置了一个kprobe,现在我需要在kprobe的预处理器函数中获取它的参数值。这是我的功能:voidfoobar(intarg,intarg2,intarg3,intarg4,intarg5,intarg6,intarg7,intarg8){printk("foobarcalled\n");}将kprobe放在上面并调用函数:...kp.addr=(kprobe_opcode_t*)foobar;register_kprobe(&kp);foobar(0xdead1,0xdead2,0xdead3,0xdead4,0xdead5,0xdead6,0xdead7,0x

linux - 使用 kprobes 获取函数参数

我已经在一个函数上放置了一个kprobe,现在我需要在kprobe的预处理器函数中获取它的参数值。这是我的功能:voidfoobar(intarg,intarg2,intarg3,intarg4,intarg5,intarg6,intarg7,intarg8){printk("foobarcalled\n");}将kprobe放在上面并调用函数:...kp.addr=(kprobe_opcode_t*)foobar;register_kprobe(&kp);foobar(0xdead1,0xdead2,0xdead3,0xdead4,0xdead5,0xdead6,0xdead7,0x

c - 从 inotify_event 中检索完整路径名

inotify_event结构如下所示:structinotify_event{intwd;/*Watchdescriptor*/uint32_tmask;/*Maskofevents*/uint32_tcookie;/*Uniquecookieassociatingrelatedevents(forrename(2))*/uint32_tlen;/*Sizeofnamefield*/charname[];/*Optionalnull-terminatedname*/};名称部分只存储文件名(不是文件的路径)。我们如何从inotify_event结构中获取完全限定的路径,或者我是否必须