From: Ingo Molnar <mingo@kernel.org>
To: Robert Richter <robert.richter@amd.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] perf record: Change error message on failure
Date: Thu, 13 Sep 2012 17:25:58 +0200 [thread overview]
Message-ID: <20120913152558.GA29858@gmail.com> (raw)
In-Reply-To: <20120913152145.GG8285@erda.amd.com>
* Robert Richter <robert.richter@amd.com> wrote:
> On 13.09.12 17:07:20, Ingo Molnar wrote:
> >
> > * Robert Richter <robert.richter@amd.com> wrote:
> >
> > > Only report
> > >
> > > No CONFIG_PERF_EVENTS=y kernel support configured?
> > >
> > > if the syscall fails with ENOSYS. In other cases CONFIG_PERF_EVENTS is
> > > set and might confuse users. The default message is now:
> > >
> > > Not all events could be opened.
> >
> > Indeed, and it would be nice to be even less passive-aggressive
> > and figure out and display the exact error condition?
>
> The complete error message shows the error condition and is like the
> following:
>
> # perf record -e cycles:ppk sleep 1
>
> Error: sys_perf_event_open() syscall returned with 22 (Invalid argument). /bin/dmesg may provide additional information.
>
> Not all events could be opened.
> sleep: Terminated
So in this case a better message would be something like:
Error: sys_perf_event_open() syscall failed because the 'cycles:ppk' event could not be opened
sleep: Terminated
The user is not interested in the dmesg details, nor in that the
error code is 22 -EINVAL.
Thanks,
Ingo
prev parent reply other threads:[~2012-09-13 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 10:20 [PATCH] perf record: Change error message on failure Robert Richter
2012-09-13 15:07 ` Ingo Molnar
2012-09-13 15:21 ` Robert Richter
2012-09-13 15:25 ` Ingo Molnar [this message]
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=20120913152558.GA29858@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.richter@amd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.