oprofile 0.9.8在Ubuntu 12.10下与Pentium D故障

问题描述:

我想在运行Pentium D处理器(Dell OptiPlex-GX620桌面)的Ubuntu 12.10下使用oprofile 0.9.8。当我尝试像“operf LS”简单的东西,我得到oprofile 0.9.8在Ubuntu 12.10下与Pentium D故障

perf_event_open failed with Invalid argument 
Caught runtime_error: Internal Error. Perf event setup failed. 
Error running profiler 

我有成功使用opcontrol下sudo的命令用定时器= 1(见下文)安装模块运行在传统模式下oprofile的。

似乎操作者在这种配置中不高兴 - 这是新的首选方法。

我已验证所有依赖包已加载。

在oprofile网站上,他们没有将pentium D作为单独的构架调用,因此不确定它是否使用普通的Pentium架构。

我到处搜索并找不到像这样报告的任何内容。在这里找出问题时,任何帮助都会受到赞赏。

P.S.当我使用opcontrol与传统模式下运行,我有一些成功:

[email protected]:~$ sudo opcontrol --start 
ATTENTION: Use of opcontrol is discouraged. Please see the man page for operf. 
Using default event: GLOBAL_POWER_EVENTS:100000:1:1:1 
Error: counter 0 not available nmi_watchdog using this resource ? Try: 
opcontrol --deinit 
echo 0 > /proc/sys/kernel/nmi_watchdog 

**When I force the module to be installed with timer=1** 

[email protected]:~$ sudo opcontrol --deinit 
Unloading oprofile module 
[email protected]:~$ sudo modprobe oprofile timer=1 
[email protected]:~$ sudo opcontrol --no-vmlinux 
[email protected]:~$ sudo opcontrol --start 
ATTENTION: Use of opcontrol is discouraged. Please see the man page for operf. 
Using 2.6+ OProfile kernel interface. 
Using log file /var/lib/oprofile/samples/oprofiled.log 
Daemon started. 
Profiler running. 
[email protected]:~$ ./a 
^C 
[email protected]:~$ sudo opcontrol --shutdown 

Stopping profiling. 
Killing daemon. 
[email protected]:~$ opreport --callgraph 
Using /var/lib/oprofile/samples/ for samples directory. 
warning: /no-vmlinux could not be found. 
warning: [vdso] (tgid:1697 range:0xb77ab000-0xb77ac000) could not be found. 
warning: [vdso] (tgid:1728 range:0xb77b6000-0xb77b7000) could not be found. 
warning: [vdso] (tgid:3310 range:0xb7702000-0xb7703000) could not be found. 
CPU: CPU with timer interrupt, speed 2992.41 MHz (estimated) 
Profiling through timer interrupt 
samples %  image name    app name     symbol name 
------------------------------------------------------------------------------- 
31878 81.1868 no-vmlinux    no-vmlinux    /no-vmlinux 
    31878 100.000 no-vmlinux    no-vmlinux    /no-vmlinux [self] 
------------------------------------------------------------------------------- 
2820  7.1820 a      a      main 
    2820  100.000 a      a      main [self] 
------------------------------------------------------------------------------- 
1065  2.7123 vino-server    vino-server    /usr/lib/vino/vino-server 
    1065  100.000 vino-server    vino-server    /usr/lib/vino/vino-server [self] 
------------------------------------------------------------------------------- 
1056  2.6894 a      a      b 
    1056  100.000 a      a      b [self] 
------------------------------------------------------------------------------- 
1013  2.5799 a      a      c 
    1013  100.000 a      a      c [self] 
------------------------------------------------------------------------------- 
968  2.4653 a      a      d 
    968  100.000 a      a      d [self] 
------------------------------------------------------------------------------- 
264  0.6724 libc-2.15.so    libc-2.15.so    /lib/i386-linux-gnu/libc-2.15.so 
. . . . . 

不知道这是主要的问题,但该错误消息说 -

"Error: counter 0 not available nmi_watchdog using this resource. Try: opcontrol --deinit echo 0 > /proc/sys/kernel/nmi_watchdog".

为了摆脱这个你有禁用NMI看门狗内核参数。在Ubuntu上它通过grub做 -

  1. 编辑/etc/default/grub并添加“nmi_watchdog=0”GRUB_CMDLINE_LINUX

  2. 然后运行sudo update-grub并检查值与 cat /proc/sys/kernel/nmi_watchdog(应该是“0”)。如果需要,重新安装新的配置。