Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752541Ab3GICTJ (ORCPT ); Mon, 8 Jul 2013 22:19:09 -0400 Received: from mail-vb0-f49.google.com ([209.85.212.49]:43228 "EHLO mail-vb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653Ab3GICTG (ORCPT ); Mon, 8 Jul 2013 22:19:06 -0400 Date: Mon, 8 Jul 2013 22:24:34 -0400 (EDT) From: Vince Weaver To: Michael Ellerman cc: Peter Zijlstra , Vince Weaver , Runzhen Wang , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, paulus@samba.org, acme@redhat.com, mingo@kernel.org, vincent.weaver@maine.edu, Stephane Eranian , sukadev@linux.vnet.ibm.com, xiaoguangrong@linux.vnet.ibm.com Subject: Re: [PATCH v2 2/2] perf tools: Make Power7 events available for perf In-Reply-To: <20130709012952.GA7185@concordia> Message-ID: References: <1372170933-4538-1-git-send-email-runzhen@linux.vnet.ibm.com> <1372170933-4538-3-git-send-email-runzhen@linux.vnet.ibm.com> <20130704125218.GA21134@concordia> <20130704125700.GM18898@dyad.programming.kicks-ass.net> <20130709012952.GA7185@concordia> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1672 Lines: 41 On Tue, 9 Jul 2013, Michael Ellerman wrote: > On Thu, Jul 04, 2013 at 02:57:00PM +0200, Peter Zijlstra wrote: > > > > Right; I think Stephane and Jiri are in favour of creating a 'new' project that > > includes just the event definitions in a plain text format and a little library > > with parser to be used by all interested parties. > > OK that would be great. > > The part that seems to be missing to make that work is we have no way of > matching the PMU that appears in /sys with a list of events. > > Eg. on my system I have /sys/bus/event_source/devices/cpu - but there's > nothing in there to identify that it's a Sandy Bridge. So something like they have on ARM? vince@pandaboard:/sys/bus/event_source/devices$ ls -l lrwxrwxrwx 1 root root 0 Jul 8 21:57 ARMv7 Cortex-A9 -> ../../../devices/ARMv7 Cortex-A9 lrwxrwxrwx 1 root root 0 Jul 8 21:57 breakpoint -> ../../../devices/breakpoint lrwxrwxrwx 1 root root 0 Jul 8 21:57 software -> ../../../devices/software lrwxrwxrwx 1 root root 0 Jul 8 21:57 tracepoint -> ../../../devices/tracepoint > For the cpu you can obviously just detect what processor you're on with > cpuid or whatever, but it's a bit of a hack. And that really doesn't > work for non-cpu PMUs. why is it a hack to use cpuid? People have done event lists in userspace for years. Why must it be the kernel's job? Vince Weaver vincent.weaver@maine.edu http://www.eece.maine.edu/~vweaver/ -- 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/