Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1181383

Re: [RFC PATCH] perf: Provide status of known PMUs

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] perf: Provide status of known PMUs
Date 2015-07-10 10:40 +0200
Message-ID <pKC0H-3Bu-45@gated-at.bofh.it> (permalink)
References (1 earlier) <pKfQt-6pD-3@gated-at.bofh.it> <pKgjv-6P0-9@gated-at.bofh.it> <pKiOn-8rE-31@gated-at.bofh.it> <pKjho-9T-21@gated-at.bofh.it> <pKjr4-dD-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Thu, Jul 09, 2015 at 02:32:05PM +0200, Ingo Molnar wrote:
> > 
> >    perf record error: The 'bts' PMU is not available, because the CPU does not support it
> 
> This one makes sense.
> 
> >    perf record error: The 'bts' PMU is not available, because this architecture does not support it
> >    perf record error: The 'bts' PMU is not available, because its driver is not built into the kernel
> > 
> > Because if it's the wrong architecture or CPU, I look for a box with the right 
> > one, if it's simply the kernel not having the necessary PMU driver then I'll boot 
> > a kernel with it enabled.
> 
> These not so much; why won't a generic: "Unknown PMU, check arch/kernel" do?

Yeah, I mean why not make the user's job harder if we can? We really don't want to 
solve this problem technically and we _really_ want tooling to be fundamentally 
unhelpful, right? ;-)

I realize that the 'Error: there was a bug, aborting' style of sado-masochistic 
error messages are the current Linux tooling status quo, which opaque error 
feedback comes from an early technological mistake of Unix system calls screwing 
up error handling, and I also see that after decades of abuse people are showing 
signs of the Stockholm Syndrome related to this problem, but it _really_ does not 
have to be so ...

Whenever we can we should change such bad patterns.

> The thing is, I hate that hard-coded list, its pain I don't need.

Absolutely! I pointed this out during review as well.

It does not impact the core concept though: we should have a single numeric error, 
and free form error strings provided by the place that first triggers some 
problem. That should be both programmatically easy to handle and maximally 
informative to the users.

At least half of a tool's usability comes not from how it behaves when it works, 
but how it behaves when it does not. (SystemD, I'm looking at you.)

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH] perf: Provide status of known PMUs Adrian Hunter <adrian.hunter@intel.com> - 2015-07-09 10:00 +0200
  Re: [RFC PATCH] perf: Provide status of known PMUs Ingo Molnar <mingo@kernel.org> - 2015-07-09 10:20 +0200
    Re: [RFC PATCH] perf: Provide status of known PMUs Adrian Hunter <adrian.hunter@intel.com> - 2015-07-09 10:50 +0200
  Re: [RFC PATCH] perf: Provide status of known PMUs Peter Zijlstra <peterz@infradead.org> - 2015-07-09 11:00 +0200
    Re: [RFC PATCH] perf: Provide status of known PMUs Peter Zijlstra <peterz@infradead.org> - 2015-07-09 13:50 +0200
    Re: [RFC PATCH] perf: Provide status of known PMUs Peter Zijlstra <peterz@infradead.org> - 2015-07-09 14:10 +0200
      Re: [RFC PATCH] perf: Provide status of known PMUs Ingo Molnar <mingo@kernel.org> - 2015-07-09 14:40 +0200
        Re: [RFC PATCH] perf: Provide status of known PMUs Peter Zijlstra <peterz@infradead.org> - 2015-07-09 14:50 +0200
          Re: [RFC PATCH] perf: Provide status of known PMUs Ingo Molnar <mingo@kernel.org> - 2015-07-10 10:40 +0200

csiph-web