我正在尝试在虚拟机中使用oprofile作为分析工具。但是,如果我这样做了
operf我得到以下错误:
Your kernel's Performance Events Subsystem does not support your processor type.
Please use the opcontrol command instead of operf.因此,我尝试了opcontrol。我以root用户身份执行了以下操作
opcontrol --deinit
rm /root/.oprofile/daemonrc
opcontrol --init
opcontrol --start它返回了以下错误
Cannot find event CPU_CLK_UNHALTED
Using default event: CPU_CLK_UNHALTED:100000:0:1:1
Cannot find event CPU_CLK_UNHALTED根据bug跟踪器(http://sourceforge.net/p/oprofile/bugs/268/)的说法,我所做的已经是让oprofile在VMware环境中工作的变通方法。
我的操作系统是
Linux version 3.19.0-25-generic (buildd@lgw01-20) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015它安装在虚拟机中。虚拟机软件为VMware 7.1.1。主机操作系统为Mac OS X 10.10
发布于 2015-12-02 03:48:06
我也遇到了同样的问题,并通过oprofile on Linux running in a virtual machine在http://blogs.epfl.ch/category/3239找到了解决方案
默认情况下,oprofile内核模块似乎是通过调用
opcontrol --init未启用计时器支持。
解决方案是卸载内核模块
opcontrol --deinit并手动加载它,传递一个启用计时器支持的选项
modprobe oprofile timer=1在做完这些之后
opcontrol --start-daemon对我很管用。
https://stackoverflow.com/questions/32511341
复制相似问题