Re: [PATCH] perf record: Change error message on failure

From: Robert Richter
Date: Thu Sep 13 2012 - 11:21:57 EST

On 13.09.12 17:07:20, Ingo Molnar wrote:
> * Robert Richter <robert.richter@xxxxxxx> wrote:
> > Only report
> >
> > No CONFIG_PERF_EVENTS=y kernel support configured?
> >
> > if the syscall fails with ENOSYS. In other cases CONFIG_PERF_EVENTS is
> > set and might confuse users. The default message is now:
> >
> > Not all events could be opened.
> Indeed, and it would be nice to be even less passive-aggressive
> and figure out and display the exact error condition?

The complete error message shows the error condition and is like the

# perf record -e cycles:ppk sleep 1

Error: sys_perf_event_open() syscall returned with 22 (Invalid argument). /bin/dmesg may provide additional information.

Not all events could be opened.
sleep: Terminated


Advanced Micro Devices, Inc.
Operating System Research Center

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at