Reputation: 1
I am trying to use oprofile 0.9.8 under Ubuntu 12.10 running on a Pentium D processor (Dell OptiPlex-GX620 desktop). When I try something simple like "operf ls" I get
perf_event_open failed with Invalid argument
Caught runtime_error: Internal Error. Perf event setup failed.
Error running profiler
I have success running oprofile in legacy mode using opcontrol commands under sudo by installing the module with timer=1 (see below).
It appears that operf is unhappy in this configuration - which is the new preferred method.
I have verified that all the dependent packages are loaded.
On the oprofile website they do not call out pentium D as a seperate architucture so not sure if it is using regular Pentium architecture.
I have searched everywhere and can't find anything like this reported. Any help would be appreciated in identifying the problem here.
P.S. When I run with legacy mode using opcontrol I have some success:
denham@denham-OptiPlex-GX620:~$ 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**
denham@denham-OptiPlex-GX620:~$ sudo opcontrol --deinit
Unloading oprofile module
denham@denham-OptiPlex-GX620:~$ sudo modprobe oprofile timer=1
denham@denham-OptiPlex-GX620:~$ sudo opcontrol --no-vmlinux
denham@denham-OptiPlex-GX620:~$ 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.
denham@denham-OptiPlex-GX620:~$ ./a
^C
denham@denham-OptiPlex-GX620:~$ sudo opcontrol --shutdown
Stopping profiling.
Killing daemon.
denham@denham-OptiPlex-GX620:~$ 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
. . . . .
Upvotes: 0
Views: 1355
Reputation: 1854
Don't know if this is the main problem but the error message says -
"Error: counter 0 not available nmi_watchdog using this resource. Try: opcontrol --deinit echo 0 > /proc/sys/kernel/nmi_watchdog".
To get rid of this you have to disable NMI watchdog kernel parameter. On Ubuntu it is done via grub
-
Edit /etc/default/grub
and add “nmi_watchdog=0”
to the GRUB_CMDLINE_LINUX
.
Then run sudo update-grub
and check the value with
cat /proc/sys/kernel/nmi_watchdog
(should be "0"). Reboot to install new config if needed.
Upvotes: 1