【发布时间】:2010-09-09 10:29:06
【问题描述】:
我正在使用 VirtualBox 运行 Linux Ubuntu 10.4 VM。我正在尝试使用 oprofile 来分析虚拟机中的某些应用程序。我已经安装了 oprofile 0.9.6,但我无法让它工作。当我尝试启动时,出现以下错误:
opcontrol --start
/usr/local/bin/opcontrol: line 323: /usr/local/bin/ophelp: cannot execute binary file
/usr/local/bin/opcontrol: line 1483: /usr/local/bin/oprofiled: cannot execute binary file
Couldn't start oprofiled.
Check the log file "/var/lib/oprofile/samples/oprofiled.log" and kernel syslog
由于我不确定 VirtualBox 是否可以提供对性能计数器的访问(我对此表示怀疑,所以如果您有任何指针,那就太好了)我默认 oprofile 为定时器中断,如下所示:
opcontrol --deinit
/usr/local/bin/opcontrol: line 323: /usr/local/bin/ophelp: cannot execute binary file
Unloading oprofile module
root@dev-ubuntu-10:/usr/local/bin# /sbin/modprobe oprofile timer=1
root@dev-ubuntu-10:/usr/local/bin# opcontrol --init
但仍然无法正常工作,我遇到了同样的错误。甚至可以在虚拟机中运行 oprofile 吗?
谢谢
【问题讨论】:
标签: profiling g++ performance oprofile