Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-13 Thread Vineet Gupta
On Friday 13 May 2016 04:34 AM, Vince Weaver wrote: > On Thu, 12 May 2016, Peter Zijlstra wrote: > >> Ah.. which might be a hint that nobody is actually explicitly testing >> for this and we might just get away with changing the ABI. >> >> Vince, what say you; shall we try and get away with it?

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-13 Thread Vineet Gupta
On Friday 13 May 2016 04:34 AM, Vince Weaver wrote: > On Thu, 12 May 2016, Peter Zijlstra wrote: > >> Ah.. which might be a hint that nobody is actually explicitly testing >> for this and we might just get away with changing the ABI. >> >> Vince, what say you; shall we try and get away with it?

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Vince Weaver
On Thu, 12 May 2016, Peter Zijlstra wrote: > Ah.. which might be a hint that nobody is actually explicitly testing > for this and we might just get away with changing the ABI. > > Vince, what say you; shall we try and get away with it? ;-) It's probably worth trying. The only other time anyone

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Vince Weaver
On Thu, 12 May 2016, Peter Zijlstra wrote: > Ah.. which might be a hint that nobody is actually explicitly testing > for this and we might just get away with changing the ABI. > > Vince, what say you; shall we try and get away with it? ;-) It's probably worth trying. The only other time anyone

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Peter Zijlstra
On Thu, May 12, 2016 at 12:24:25PM +0530, Vineet Gupta wrote: > On Thursday 12 May 2016 12:12 PM, Peter Zijlstra wrote: > >> Tried that and doesn't even compile. Reconfirms what Vince said, ENOTSUPP > >> is not > >> > exposed to userspace (being in include/linux and not include/uapi/linux) > >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Peter Zijlstra
On Thu, May 12, 2016 at 12:24:25PM +0530, Vineet Gupta wrote: > On Thursday 12 May 2016 12:12 PM, Peter Zijlstra wrote: > >> Tried that and doesn't even compile. Reconfirms what Vince said, ENOTSUPP > >> is not > >> > exposed to userspace (being in include/linux and not include/uapi/linux) > >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Vineet Gupta
On Thursday 12 May 2016 12:12 PM, Peter Zijlstra wrote: >> Tried that and doesn't even compile. Reconfirms what Vince said, ENOTSUPP is >> not >> > exposed to userspace (being in include/linux and not include/uapi/linux) > Durr, so what does userspace see? It sees the "value" of ENOTSUPP, i.e.

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Vineet Gupta
On Thursday 12 May 2016 12:12 PM, Peter Zijlstra wrote: >> Tried that and doesn't even compile. Reconfirms what Vince said, ENOTSUPP is >> not >> > exposed to userspace (being in include/linux and not include/uapi/linux) > Durr, so what does userspace see? It sees the "value" of ENOTSUPP, i.e.

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Peter Zijlstra
On Thu, May 12, 2016 at 11:58:43AM +0530, Vineet Gupta wrote: > On Thursday 12 May 2016 01:06 AM, Peter Zijlstra wrote: > > On Mon, May 09, 2016 at 10:53:43PM +0530, Vineet Gupta wrote: > > > >> > Right thats what I feared. But hold on, I don't think we need to change > >> > the ABI to > >> >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Peter Zijlstra
On Thu, May 12, 2016 at 11:58:43AM +0530, Vineet Gupta wrote: > On Thursday 12 May 2016 01:06 AM, Peter Zijlstra wrote: > > On Mon, May 09, 2016 at 10:53:43PM +0530, Vineet Gupta wrote: > > > >> > Right thats what I feared. But hold on, I don't think we need to change > >> > the ABI to > >> >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Vineet Gupta
On Thursday 12 May 2016 01:06 AM, Peter Zijlstra wrote: > On Mon, May 09, 2016 at 10:53:43PM +0530, Vineet Gupta wrote: > >> > 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. >> > >> >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-12 Thread Vineet Gupta
On Thursday 12 May 2016 01:06 AM, Peter Zijlstra wrote: > On Mon, May 09, 2016 at 10:53:43PM +0530, Vineet Gupta wrote: > >> > 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. >> > >> >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-11 Thread Peter Zijlstra
On Mon, May 09, 2016 at 10:53:43PM +0530, Vineet Gupta wrote: > 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 >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-11 Thread Peter Zijlstra
On Mon, May 09, 2016 at 10:53:43PM +0530, Vineet Gupta wrote: > 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 >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-10 Thread Vince Weaver
On Mon, 9 May 2016, Vineet Gupta wrote: > 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 > >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-10 Thread Vince Weaver
On Mon, 9 May 2016, Vineet Gupta wrote: > 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 > >

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-09 Thread Vineet Gupta
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

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-09 Thread Vineet Gupta
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

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-09 Thread Vince Weaver
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. The original change from ENODEV to ENOTSUPP managed to break things

Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-09 Thread Vince Weaver
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. The original change from ENODEV to ENOTSUPP managed to break things

[RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-09 Thread Vineet Gupta
This allows userspace to identify this case specifically from the catch all error msg it prints currently. This is an ABI change Before --- | # perf record ls | Error: | The sys_perf_event_open() syscall returned with 524 (Unknown error 524) | for event (cycles:ppp). | /bin/dmesg may provide

[RFC 2/2] perf/core: change errno for sampling event not supported in hardware

2016-05-09 Thread Vineet Gupta
This allows userspace to identify this case specifically from the catch all error msg it prints currently. This is an ABI change Before --- | # perf record ls | Error: | The sys_perf_event_open() syscall returned with 524 (Unknown error 524) | for event (cycles:ppp). | /bin/dmesg may provide