Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753415AbbGIMcR (ORCPT ); Thu, 9 Jul 2015 08:32:17 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:35164 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751884AbbGIMcK (ORCPT ); Thu, 9 Jul 2015 08:32:10 -0400 Date: Thu, 9 Jul 2015 14:32:05 +0200 From: Ingo Molnar To: Peter Zijlstra Cc: Adrian Hunter , Arnaldo Carvalho de Melo , Andy Lutomirski , Vince Weaver , Thomas Gleixner , "H. Peter Anvin" , linux-kernel@vger.kernel.org, Jiri Olsa , Stephane Eranian , Borislav Petkov , Alexander Shishkin , Andi Kleen Subject: Re: [RFC PATCH] perf: Provide status of known PMUs Message-ID: <20150709123205.GA9496@gmail.com> References: <1436428080-3098-1-git-send-email-adrian.hunter@intel.com> <20150709085022.GB2859@worktop.programming.kicks-ass.net> <20150709092656.GA13336@gmail.com> <20150709115948.GS19282@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150709115948.GS19282@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1916 Lines: 48 * Peter Zijlstra wrote: > On Thu, Jul 09, 2015 at 11:26:56AM +0200, Ingo Molnar wrote: > > > > * Peter Zijlstra 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/