Skip to contentSkip to conversation

Multiple commands in perf 3.2.30 and 3.5.5 on Ubuntu 12 do not work

DISCUSSION Florin Trofin 2 participants 2 messages Nov 13, 2012 – Nov 15, 2012

lore
Share & tools
lore
#0 lore raw

I mentioned in a previous post that "perf archive" command is not recognized on Ubuntu 12.04 (perf version 3.2.30) although it is listed in the --help output. I wanted to see if the issue was fixed in a later version so I tried Ubuntu 12.10 (perf version 3.5.5) and it has the same problems:
archive is not recognized as a valid command, and other commands fail as well:

$ perf timechart record sleep 2
invalid or unsupported event: 'power:cpu_frequency'
Run 'perf list' for a list of valid events

Another command that doesn't work:

$ perf lock record sleep 2
invalid or unsupported event: 'lock:lock_acquire'
Run 'perf list' for a list of valid events

This makes me think that either perf is mostly broken in the new versions or something is wrong on my machine (although installation went smoothly). I installed perf by doing:

$ sudo apt-get install linux-tools-common
$ sudo apt-get install linux-tools-3.5.0-17

Can somebody shed some light on this please?

TIA,

Florin

#1 lore raw

Hi Florin,

Quoted 16 lines · Florin Trofin

I mentioned in a previous post that "perf archive" command is not recognized on Ubuntu 12.04 (perf version 3.2.30) although it is listed in the --help output. I wanted to see if the issue was fixed in a later version so I tried Ubuntu 12.10 (perf version 3.5.5) and it has the same problems:
archive is not recognized as a valid command, and other commands fail as well:

$ perf timechart record sleep 2
invalid or unsupported event: 'power:cpu_frequency'
Run 'perf list' for a list of valid events

Another command that doesn't work:

$ perf lock record sleep 2
invalid or unsupported event: 'lock:lock_acquire'
Run 'perf list' for a list of valid events
Quoted 8 lines

This makes me think that either perf is mostly broken in the new versions or something is wrong on my machine (although installation went smoothly). I installed perf by doing:

$ sudo apt-get install linux-tools-common
$ sudo apt-get install linux-tools-3.5.0-17

Can somebody shed some light on this please?

It looks like a problem of opening a tracepoint event. More specifically there's a problem in accessing debugfs. Even after changing /proc/sys/kernel/perf_events_paranoid to -1, I failed to record tracepoint events.

$ ls /sys/kernel/debug
ls: cannot open directory /sys/kernel/debug: Permission denied
$ sudo ls -la /sys/kernel/debug | head -3
total 0
drwx------. 19 root root 0 Nov  6 10:38 .
drwxr-xr-x.  8 root root 0 Nov  6 10:38 ..
$ perf record -e sched:sched_switch
invalid or unsupported event: 'sched:sched_switch'
Run 'perf list' for a list of valid events

I have no idea when it's changed, I used to be abled to access tracepoint events as a non-root user with the perf_events_paranoid setting.

But this is failed on a recent kernel (w/ Fedora 17).

$ uname -a
Linux sejong.aot.lge.com 3.7.0-rc2+ #35 SMP PREEMPT Tue Nov 6 10:33:02 KST 2012 x86_64 x86_64 x86_64 GNU/Linux

Anyways, running as root will solve your problem I guess.

Thanks,
Namhyung