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


Groups > linux.kernel > #1180681

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-09 14:40 +0200
Message-ID <pKjho-9T-21@gated-at.bofh.it> (permalink)
References <pKeUr-5Qy-13@gated-at.bofh.it> <pKfQt-6pD-3@gated-at.bofh.it> <pKgjv-6P0-9@gated-at.bofh.it> <pKiOn-8rE-31@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 11:26:56AM +0200, Ingo Molnar wrote:
> > 
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> > 
> > > On Thu, Jul 09, 2015 at 10:48:00AM +0300, Adrian Hunter wrote:
> > >
> > > > Known PMUs may not be present for various reasons. Provide a way for the user 
> > > > to know what the reason is.
> > > 
> > > Not a bad idea, but I do wonder where we should draw the line on what is 
> > > 'known'. The patch as proposed will have bts/pt listed as 'known' for every arch 
> > > out there.
> > > 
> > > By that logic, x86 should list the ppc/sparc/mips/arm/etc.. PMUs as known 
> > > and wrong_arch too, which might be a tad excessive.
> > 
> > Absolutely x86 should list them as well - from a user POV arch dependent 
> > tooling sucks in general. There's nothing more annoying than trying to figure 
> > out why a particular tool does not work.
> 
> But why would the tool care?

Yeah, but the user cares. If I type something like:

   perf record -e bts// --per-thread sleep 1

... and it does not work, I expect the tool to print something informative and 
productive, for example one of these:

   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 the CPU 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.

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 | Next 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