All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Vince Weaver <vincent.weaver@maine.edu>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
	Stephane Eranian <eranian@google.com>,
	Borislav Petkov <bp@suse.de>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [RFC PATCH] perf: Provide status of known PMUs
Date: Fri, 10 Jul 2015 10:35:23 +0200	[thread overview]
Message-ID: <20150710083523.GA11445@gmail.com> (raw)
In-Reply-To: <20150709124257.GU19282@twins.programming.kicks-ass.net>


* 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

  parent reply	other threads:[~2015-07-10  8:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09  7:48 [RFC PATCH] perf: Provide status of known PMUs Adrian Hunter
2015-07-09  8:10 ` Ingo Molnar
2015-07-09  8:44   ` Adrian Hunter
2015-07-09  8:50 ` Peter Zijlstra
2015-07-09  9:26   ` Ingo Molnar
2015-07-09 11:59     ` Peter Zijlstra
2015-07-09 12:32       ` Ingo Molnar
2015-07-09 12:42         ` Peter Zijlstra
2015-07-09 14:47           ` Arnaldo Carvalho de Melo
2015-07-10  8:35           ` Ingo Molnar [this message]
2015-07-10 18:59             ` Stephane Eranian
2015-07-09  9:30   ` Adrian Hunter
2015-07-09 11:44     ` Peter Zijlstra

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=20150710083523.GA11445@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bp@suse.de \
    --cc=eranian@google.com \
    --cc=hpa@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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.