[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120917071113.GA31305@gmail.com>
Date: Mon, 17 Sep 2012 09:11:13 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
David Ahern <dsahern@...il.com>, linux-kernel@...r.kernel.org,
Robert Richter <robert.richter@....com>
Subject: Re: [PATCH 3/3 v2] perf tool: give user better message if precise is
not supported
* Peter Zijlstra <peterz@...radead.org> wrote:
> On Fri, 2012-09-14 at 22:11 +0200, Ingo Molnar wrote:
> > return -EPERF_CPU_PRECISE_EV_NOTSUPP;
>
> I just don't like having to enumerate all possible fails, I'm
> too lazy. Can't we be smarter about that? Could we do a
> {reason}x{bit-offset} like thing?
>
> Where we limit reason to a few simple things like:
>
> invalid
> out-of-range
> not-supported
>
> and have the bit-offset indicate the field we're having the particular
> problem with?
>
> Then all we need is a smart way to generate and map the bit-offsets
> without too much manual labour.
Putting the 'where' into a separate field would do that, and
thus we could generate and report such structured errors as well
- but nevertheless there will always be special/individual
errors as well that won't fit into such a scheme, for which we
should include a 'boring' errno range as well ...
I.e. a {where},{what} s32 pair of fields - if 'where' is zero
then 'what' is the enumerated errno value I suggested, if it's
nonzero then it's the 'where' indication you suggested.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists