I am trying to use perf in a system with 3.8 linux kernel. When I used the following command, error happens:

$ perf record -c 100000 -e '{cycles,instructions}:S' ./nonloop 1000
failed to mmap with 25 (Inappropriate ioctl for device)
nonloop: Terminated

Could anyone tell me how to solve the problem?


Looks like :S is the problem.

perf record -c 100000 -ecycles,instructions ./somebin

runs fine. What is :S ?

I'm seeing a similar error running:

sudo perf record -esyscalls:sys_enter -p $(pidof some_bin)

failed to mmap with 22 (Invalid argument)

where perf list suggests syscalls:sys_enter should be available.

| improve this answer | |

Your Answer

