[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#696957: linux-tools-3.2: perf record should state that sys.kernel.perf_event_paranoid might have something to do with its failure



Control: tag -1 unreproducible

On Sun, 2012-12-30 at 08:56 +1100, Michael van der Kolff wrote:
> Package: linux-tools-3.2
> Version: 3.2.17-1
> Severity: normal
> 
> Dear Maintainer,
> When issuing "perf record -p <annoying_process_id> -g", I got "Fatal: failed to
> mmap with 22 (Invalid argument)".  This is remedied by setting
> /proc/sys/kernel/perf_event_paranoid to -1 (I tested it with 0, and it still
> occurred).
> 
> perf record should state what sys.kernel.perf_event_paranoid should be set to
> in response to failure, instead of giving me such a useless error message.

I can't reproduce this:

$ perf record -p 20140 -g  # 20140 is my own process
^C[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.015 MB perf.data (~634 samples) ]
$ perf record -p 1 -g
Error:
Permission error - are you root?
Consider tweaking /proc/sys/kernel/perf_event_paranoid:

Is the target process running under the same uid as perf?  Can you
provide an strace log for this?

Ben.

-- 
Ben Hutchings
It is easier to change the specification to fit the program than vice versa.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: