error: no sample files found: pr…

来源:互联网 发布:淘宝用户接口 编辑:程序博客网 时间:2024/04/30 01:12

$opreport

opreporterror: No sample file found: try running opcontrol--dump

or specifya session containing sample files

 

$tree/var/lib/oprofile/samples/current/

/var/lib/oprofile/samples/current/

 

0directories, 0 files

确实是没抓到sample文件!

 

经过无数次的分析和判断,再加上goolge大神的帮助,找到问题的根源了:

 

$dmesg|grep oprofile

oprofile:using NMI timer interrupt.

 

#如果你的CPU不被oprofile认识,或者说认识有问题,oprofile就会进入timerinterrupt模式

#表现就是

 

$ophelp

Usingtimer interrupt.

 

$sudoopcontrol --setup -e CPU_CLK_UNHALTED:6000:0:0:1

You cannotspecify any performance counter events

becauseOProfile is in timer mode.

如果你看到上面的字,对不起你肯定抓不到数据的,解决方案是这样的:

oprofile模块加载的时候强制使用timer=1.

 

$sudoopcontrol --deinit

Daemon notrunning

Unloadingoprofile module

 

$sudomodprobe oprofiletimer=1  

 

$dmesg|grep oprofile|tail -n 1

oprofile:using timer interrupt.

如果你看到上面的字说明你成功了。

0 0
原创粉丝点击