我在我的系统上运行oprofile时遇到了一个非常烦人的错误,让我很困扰:
$ sudo opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/`uname -r`/vmlinux
$ sudo opcontrol --start
ATTENTION: Use of opcontrol is discouraged. Please see the man page for operf.
Using default event: CPU_CLK_UNHALTED:100000:0:1:1
Using 2.6+ OProfile kernel interface.
Reading module info.
Failed to open profile device: Device or resource busy
Couldn't start oprofiled.
Check the log file "/var/lib/oprofile/samples/oprofiled.log" and kernel syslog
任何熟悉 Oprofile 的人都会注意到,我正在使用正确的命令序列来调用服务。这直接来自于Fedora文档。内核调试信息也已安装以生成适当的 vmlinux 文件。但即使将此文件的位置传递给 oprofile,也没有任何变化:
$ sudo opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/3.12.11-201.fc19.x86_64/vmlinux
$ sudo opcontrol --start
ATTENTION: Use of opcontrol is discouraged. Please see the man page for operf.
Using default event: CPU_CLK_UNHALTED:100000:0:1:1
Using 2.6+ OProfile kernel interface.
Reading module info.
Failed to open profile device: Device or resource busy
Couldn't start oprofiled.
Check the log file "/var/lib/oprofile/samples/oprofiled.log" and kernel syslog
此外,指定位置没有日志文件。我已经尝试了几种其他解决方案,包括重新安装、删除守护进程以及在不对内核进行分析的情况下运行。
- 为什么设备忙碌而没有oprofile进程在运行?
- 为什么没有写入日志文件?
- 我需要更改什么才能运行oprofile?