[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131205092937.GB1265@krava.brq.redhat.com>
Date: Thu, 5 Dec 2013 10:29:37 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
David Ahern <dsahern@...il.com>,
Andi Kleen <andi@...stfloor.org>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists