From: Vineet Gupta <vgupta@synopsys.com>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: linux-perf-users@vger.kernel.org, peterz@infradead.org,
acme@redhat.com, linux-snps-arc@lists.infradead.org,
linux-kernel@vger.kernel.org, mingo@kernel.org
Subject: Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware
Date: Mon, 9 May 2016 22:53:43 +0530 [thread overview]
Message-ID: <5730C79F.3060307@synopsys.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1605090923460.27332@macbook-air>
On Monday 09 May 2016 07:24 PM, Vince Weaver wrote:
> On Mon, 9 May 2016, Vineet Gupta wrote:
>
>> This allows userspace to identify this case specifically from the
>> catch all error msg it prints currently.
>>
>> This is an ABI change
>
> An ABI change which will probably break things.
Right thats what I feared. But hold on, I don't think we need to change the ABI to
achieve what we want. Gosh why did I even take that path.
Currently the errno switch case in perf_evsel__open_strerror() in doesn't handle
ENOTSUPP. So how about we add that - augmented with the same sample_period !0
check to barf for lack of sampling support.
Do you see anything wrong with that ?
-Vineet
>
> The original change from ENODEV to ENOTSUPP managed to break things
> although it took four kernel releases before anyone noticed.
>
> The usage of ENOTSUPP was my fault, though I feel like at the time I was
> told that ENOTSUPP is for internal kernel usage and would be converted to
> EOPNOTSUPP when returning an error to userspace. But now I
> can't find any sort of reference for that at all, except the fact that
>
> /usr/include/x86_64-linux-gnu/bits/errno.h
>
> has
> /* Linux has no ENOTSUP error code. */
> # define ENOTSUP EOPNOTSUPP
>
> in it... but wait, that's ENOTSUP not ENOTSUPP. Blargh.
>
> Vince
>
WARNING: multiple messages have this Message-ID (diff)
From: vgupta@synopsys.com (Vineet Gupta)
To: linux-snps-arc@lists.infradead.org
Subject: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware
Date: Mon, 9 May 2016 22:53:43 +0530 [thread overview]
Message-ID: <5730C79F.3060307@synopsys.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1605090923460.27332@macbook-air>
On Monday 09 May 2016 07:24 PM, Vince Weaver wrote:
> On Mon, 9 May 2016, Vineet Gupta wrote:
>
>> This allows userspace to identify this case specifically from the
>> catch all error msg it prints currently.
>>
>> This is an ABI change
>
> An ABI change which will probably break things.
Right thats what I feared. But hold on, I don't think we need to change the ABI to
achieve what we want. Gosh why did I even take that path.
Currently the errno switch case in perf_evsel__open_strerror() in doesn't handle
ENOTSUPP. So how about we add that - augmented with the same sample_period !0
check to barf for lack of sampling support.
Do you see anything wrong with that ?
-Vineet
>
> The original change from ENODEV to ENOTSUPP managed to break things
> although it took four kernel releases before anyone noticed.
>
> The usage of ENOTSUPP was my fault, though I feel like at the time I was
> told that ENOTSUPP is for internal kernel usage and would be converted to
> EOPNOTSUPP when returning an error to userspace. But now I
> can't find any sort of reference for that at all, except the fact that
>
> /usr/include/x86_64-linux-gnu/bits/errno.h
>
> has
> /* Linux has no ENOTSUP error code. */
> # define ENOTSUP EOPNOTSUPP
>
> in it... but wait, that's ENOTSUP not ENOTSUPP. Blargh.
>
> Vince
>
next prev parent reply other threads:[~2016-05-09 17:23 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 9:37 [RFC 0/2] report perf sampling failing due to PMU lacking overflow intr support Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-05-09 9:37 ` [RFC 1/2] tools/perf: Handle EOPNOTSUPP for sampling events Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-06-03 10:52 ` [tip:perf/core] tools/perf: Handle -EOPNOTSUPP " tip-bot for Vineet Gupta
2016-06-03 10:52 ` tip-bot for Vineet Gupta
2016-05-09 9:37 ` [RFC 2/2] perf/core: change errno for sampling event not supported in hardware Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-05-09 13:54 ` Vince Weaver
2016-05-09 13:54 ` Vince Weaver
2016-05-09 17:23 ` Vineet Gupta [this message]
2016-05-09 17:23 ` Vineet Gupta
2016-05-11 3:33 ` Vince Weaver
2016-05-11 3:33 ` Vince Weaver
2016-05-11 19:36 ` Peter Zijlstra
2016-05-11 19:36 ` Peter Zijlstra
2016-05-11 19:36 ` Peter Zijlstra
2016-05-12 6:28 ` Vineet Gupta
2016-05-12 6:28 ` Vineet Gupta
2016-05-12 6:28 ` Vineet Gupta
2016-05-12 6:42 ` Peter Zijlstra
2016-05-12 6:42 ` Peter Zijlstra
2016-05-12 6:42 ` Peter Zijlstra
2016-05-12 6:54 ` Vineet Gupta
2016-05-12 6:54 ` Vineet Gupta
2016-05-12 6:54 ` Vineet Gupta
2016-05-12 7:25 ` Peter Zijlstra
2016-05-12 7:25 ` Peter Zijlstra
2016-05-12 7:25 ` Peter Zijlstra
2016-05-12 23:04 ` Vince Weaver
2016-05-12 23:04 ` Vince Weaver
2016-05-13 8:36 ` Vineet Gupta
2016-05-13 8:36 ` Vineet Gupta
2016-05-13 8:36 ` Vineet Gupta
2016-05-30 11:31 ` [PATCH-REBASED 0/2] report perf sampling failing due to PMU lacking overflow intr support Vineet Gupta
2016-05-30 11:31 ` Vineet Gupta
2016-05-30 11:31 ` Vineet Gupta
2016-05-30 11:31 ` [PATCH-REBASED 1/2] tools/perf: Handle EOPNOTSUPP for sampling events Vineet Gupta
2016-05-30 11:31 ` Vineet Gupta
2016-05-30 11:31 ` Vineet Gupta
2016-05-30 11:31 ` [PATCH-REBASED 2/2] perf/core: change errno for sampling event not supported in hardware Vineet Gupta
2016-05-30 11:31 ` Vineet Gupta
2016-05-30 11:31 ` Vineet Gupta
2016-06-03 10:51 ` [tip:perf/core] perf/abi: Change the " tip-bot for Vineet Gupta
2016-06-03 10:51 ` tip-bot for Vineet Gupta
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=5730C79F.3060307@synopsys.com \
--to=vgupta@synopsys.com \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=vincent.weaver@maine.edu \
/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.