Hi Jiri,

On Fri, 29 Nov 2013 12:45:04 +0100, Jiri Olsa wrote:
> hi,
> Andi reported wrong error message for :S modifier
> on kernel without event ID ioctl support.
>
> The reason was that the ioctl failed, but the error was
> printed like the mmap would:
>
>     $ perf.old record -e '{cycles,cache-misses}:S' ls
>     failed to mmap with 25 (Inappropriate ioctl for device)
>     ls: Terminated

I see same confusing error message..

>
> I experimentally added sort of 'libc errno' interface for
> perf_evlist to be able to get proper error message, like:
>
>     $ perf record -e '{cycles,cache-misses}:S' ls
>     Cannot read event group on this kernel.
>     Please consider kernel update (v3.12+).
>     ls: Terminated
>
> I'm not sure about this approach. Maybe it'd be better be more
> global..? So before throwing this out, sending it as RFC ;-)

I like it. :)  We still need to improve this user-visible error handling.

But what you mean by 'more global'?  I think the evlist APIs are pretty
global alreay.  And we have same error handling in perf_target code too.

But I think it'd be better making it thread-safe even though it's not
needed for now.  The code is growing really fast.. ;-)

Thanks,
Namhyung

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to