Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-12 Thread David Ahern
On 9/11/12 9:11 AM, Robert Richter wrote: 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 pref

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread Robert Richter
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(

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread David Ahern
On 9/11/12 8:01 AM, Robert Richter wrote: Ok, wrong question. Better would have been: Did you run it on a non-pebs Intel machine of an non-ibs AMD machine? Intel: yes. VM for example. All the servers I have now are Nehalem or better - ie., with a PEBS. AMD: no. I do not have any AMD-based s

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread Robert Richter
On 11.09.12 07:22:32, David Ahern wrote: > On 9/11/12 3:20 AM, Robert Richter wrote: > > On 10.09.12 10:40:16, David Ahern wrote: > >> --- a/tools/perf/builtin-record.c > >> +++ b/tools/perf/builtin-record.c > >> @@ -294,6 +294,11 @@ try_again: > >> perf_evsel__

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread David Ahern
On 9/11/12 3:20 AM, Robert Richter wrote: On 10.09.12 10:40:16, David Ahern wrote: --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -294,6 +294,11 @@ try_again: perf_evsel__name(pos)); rc = -err;

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread Robert Richter
On 10.09.12 10:40:16, David Ahern wrote: > --- a/tools/perf/builtin-record.c > +++ b/tools/perf/builtin-record.c > @@ -294,6 +294,11 @@ try_again: > perf_evsel__name(pos)); > rc = -err; > goto out; >