作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试使用 oprofile在大型实时应用程序中记录缓存未命中:
$ sudo opcontrol --no-vmlinux --event=LLC_MISSES:100000 --session-dir=/var/tmp/oprofile -c=5 --start
但是当我查看报告时,它没有提到缓存未命中。它只采样 CPU_CLK_UNHALTED:
$ sudo opreport -l --session-dir=/var/tmp/oprofile
CPU: Intel Architectural Perfmon, speed 1596 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
samples % image name app name symbol name
63243 92.2946 no-vmlinux no-vmlinux /no-vmlinux
564 0.8231 libc-2.13.so libc-2.13.so /lib32/libc-2.13.so
(etc)
但是 --status 声称 oprofile 正在采样 L2 未命中:
$ sudo opcontrol --status
Daemon running: pid 3220
Event 0: LLC_MISSES:500000:65:1:1
Separate options: library
vmlinux file: none
Image filter: none
Call-graph depth: 5
我做错了什么?我也无法让它对 ophelp
中列出的任何其他计数器进行采样。
这是在 Ubuntu 上使用 oprofile 0.9.6,内核版本 2.6.38。
最佳答案
事实证明你需要真正杀死并重新启动 oprofile 守护进程
sudo opcontrol --stop
sudo opcontrol --reset
sudo opcontrol --shutdown
sudo opcontrol --start-daemon
sudo opcontrol --start
更改采样事件时。仅仅停止和启动配置文件是不够的。并不是说这在任何地方都有记录。
关于linux - oprofile 不对 LLC_MISSES 缓存事件进行采样,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8001908/
我正在尝试使用 oprofile在大型实时应用程序中记录缓存未命中: $ sudo opcontrol --no-vmlinux --event=LLC_MISSES:100000 --session
我是一名优秀的程序员,十分优秀!