mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	David Ahern <dsahern@gmail.com>, Andi Kleen <andi@firstfloor.org>
Subject: Re: [RFC 0/6] perf tools: Add perf_evlist errno
Date: Mon, 02 Dec 2013 17:19:18 +0900	[thread overview]
Message-ID: <87wqjnoebd.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <1385725510-20118-1-git-send-email-jolsa@redhat.com> (Jiri Olsa's message of "Fri, 29 Nov 2013 12:45:04 +0100")

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


  parent reply	other threads:[~2013-12-02  8:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 11:45 Jiri Olsa
2013-11-29 11:45 ` [PATCH 1/6] perf tools: Add perf_evlist error string interface Jiri Olsa
2013-11-29 11:45 ` [PATCH 2/6] perf tools: Add PERF_EVLIST__ERRNO_MMAP internal error Jiri Olsa
2013-11-29 11:45 ` [PATCH 3/6] perf tools: Add PERF_EVLIST__ERRNO_OPEN " Jiri Olsa
2013-11-29 11:45 ` [PATCH 4/6] perf tools: Add PERF_EVLIST__ERRNO_IOCTL_ID_GROUP " Jiri Olsa
2013-11-29 11:45 ` [PATCH 5/6] perf tools: Add PERF_EVLIST__ERRNO_NEWTP " Jiri Olsa
2013-11-29 11:45 ` [PATCH 6/6] perf tools: Use perf_evlist__strerror in kvm/record/top/trace commands Jiri Olsa
2013-12-02  8:19 ` Namhyung Kim [this message]
2013-12-05  9:29   ` [RFC 0/6] perf tools: Add perf_evlist errno Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqjnoebd.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®