From: Robert Richter <robert.richter@amd.com>
To: David Ahern <dsahern@gmail.com>
Cc: <acme@ghostprotocols.net>, <linux-kernel@vger.kernel.org>,
<peterz@infradead.org>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 3/3] perf tool: give user better message if precise is not supported
Date: Tue, 11 Sep 2012 17:11:52 +0200 [thread overview]
Message-ID: <20120911151152.GW8285@erda.amd.com> (raw)
In-Reply-To: <504F4B97.3040701@gmail.com>
On 11.09.12 08:32:55, David Ahern wrote:
> My guess would be /usr/include/bits/errno.h:
>
> /* Linux has no ENOTSUP error code. */
> # define ENOTSUP EOPNOTSUPP
Ok, so ENOTSUP is actually the same as EOPNOTSUPP. Since the syscall
returns a EOPNOTSUPP, I prefer this when checking perf_event_open()
return codes. ENOTSUP is not used in the kernel. Was there a reason
for choosing ENOTSUP?
> > If you run this bare-metal on older machines which do not support pebs
> > or ibs, the syscall returns EOPNOTSUPP. You can trigger the same
> > behaviour on newer systems with:
> >
> > # perf record -e cycles:ppp -c 2097120 -R -a sleep 1
> >
> > Error: sys_perf_event_open() syscall returned with 95 (Operation not supported). /bin/dmesg may provide additional information.
> > ...
> >
> > It should work in this case too.
>
> The commit message was a copy and paste from the failure of both :p in a
> VM (PEBS is not supported in a VM). I also ran the bare metal case with
> :pG which per the second patch in this series generates the not
> supported message.
Since the error codes are the same, your code should work also on
bare-metal. Can you test on a host using :ppp? This should trigger the
same error message as in a vm.
Thanks,
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
next prev parent reply other threads:[~2012-09-11 15:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 16:40 [PATCH 0/3] perf: precise mode and exclude_guest David Ahern
2012-09-10 16:40 ` [PATCH 1/3] perf tool: precise mode requires exclude_guest David Ahern
2012-09-10 17:23 ` Peter Zijlstra
2012-09-10 16:40 ` [PATCH 2/3] perf: require exclude_guest to use PEBS - kernel side enforcement David Ahern
2012-09-10 17:24 ` Peter Zijlstra
2012-09-10 16:40 ` [PATCH 3/3] perf tool: give user better message if precise is not supported David Ahern
2012-09-11 9:20 ` Robert Richter
2012-09-11 13:22 ` David Ahern
2012-09-11 14:01 ` Robert Richter
2012-09-11 14:32 ` David Ahern
2012-09-11 15:11 ` Robert Richter [this message]
2012-09-12 14:59 ` David Ahern
2012-09-10 16:57 ` [PATCH 0/3] perf: precise mode and exclude_guest Peter Zijlstra
2012-09-10 17:01 ` David Ahern
2012-09-10 17:13 ` Peter Zijlstra
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=20120911151152.GW8285@erda.amd.com \
--to=robert.richter@amd.com \
--cc=acme@ghostprotocols.net \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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 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.