2011-11-03 59 views
2

我试图用oprofile记录高速缓存未命中的一个大的实时应用程序:oprofile的未抽样LLC_MISSES缓存事件

$ 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。

回答

2

原来你需要真正的杀死和改变采样事件时

sudo opcontrol --stop 
sudo opcontrol --reset 
sudo opcontrol --shutdown 
sudo opcontrol --start-daemon 
sudo opcontrol --start 

重新启动OProfile的守护进程。只需停止并启动配置文件是不够的。并不是说这是在任何地方记录。