lkml.org 
[lkml]   [2013]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 0/6] perf tools: Add perf_evlist errno
On Mon, Dec 02, 2013 at 05:19:18PM +0900, Namhyung Kim wrote:
> 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.

aah, missed the target object has that already.. I meant
to keep the same way of error handling globaly

>
> 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.. ;-)

ok, will repost

thanks,
jirka


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