error: no sample files found: pr…

$opreport

opreport error: No sample file found: try running opcontrol --dump

or specify a session containing sample files

 

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

/var/lib/oprofile/samples/current/

 

0 directories, 0 files

确实是没抓到sample文件!

 

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

 

$dmesg|grep oprofile

oprofile: using NMI timer interrupt.

 

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

#表现就是

 

$ophelp

Using timer interrupt.

 

$sudo opcontrol --setup -e CPU_CLK_UNHALTED:6000:0:0:1

You cannot specify any performance counter events

because OProfile is in timer mode.

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

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

 

$sudo opcontrol --deinit

Daemon not running

Unloading oprofile module

 

$sudo modprobe oprofile timer=1  

 

$dmesg|grep oprofile|tail -n 1

oprofile: using timer interrupt.

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值