Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752072AbbGILox (ORCPT ); Thu, 9 Jul 2015 07:44:53 -0400 Received: from casper.infradead.org ([85.118.1.10]:33443 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbbGILoo (ORCPT ); Thu, 9 Jul 2015 07:44:44 -0400 Date: Thu, 9 Jul 2015 13:44:33 +0200 From: Peter Zijlstra To: Adrian Hunter Cc: Ingo Molnar , 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: <20150709114433.GR19282@twins.programming.kicks-ass.net> References: <1436428080-3098-1-git-send-email-adrian.hunter@intel.com> <20150709085022.GB2859@worktop.programming.kicks-ass.net> <559E3F36.5020900@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <559E3F36.5020900@intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1205 Lines: 32 On Thu, Jul 09, 2015 at 12:30:30PM +0300, Adrian Hunter wrote: > On 09/07/15 11:50, Peter Zijlstra wrote: > > Can we limit it to PMUs for which we've (attempted to) load the drivers? > > That would obviously make a few of your status bits redundant, but then > > you've not explained why we're interested in it. > >> Driver not in kernel config > >> Not supported by kernel > >> Wrong architecture > > > > These will be hard, for if we don't load the driver we don't 'know' of > > them. > > Are they that hard? Because if we limit known to be what we're tried to probe, you simply do not know about PMUs for the wrong arch or not build by the kernel etc. > static struct known_pmu known_pmus[] = { > KNOWN_PMU("intel_pt", "Intel", PERF_PMU_STATUS_ARCH_X86), > KNOWN_PMU("intel_bts", "Intel", PERF_PMU_STATUS_ARCH_X86), > KNOWN_PMU(NULL, NULL, 0), > }; So I really don't like this hard-coded table much, that's just going to be a pain to maintain. -- 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/