lkml.org 
[lkml]   [2013]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC 0/6] perf tools: Add perf_evlist errno
Date
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



\
 
 \ /
  Last update: 2013-12-02 09:41    [W:1.041 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site