Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751455AbbEBHCT (ORCPT ); Sat, 2 May 2015 03:02:19 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:58663 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750894AbbEBHCR convert rfc822-to-8bit (ORCPT ); Sat, 2 May 2015 03:02:17 -0400 From: Vineet Gupta To: Sukadev Bhattiprolu , "mingo@redhat.com" , "ak@linux.intel.com" , "Michael Ellerman" , Jiri Olsa , "Arnaldo Carvalho de Melo" , Paul Mackerras CC: "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC][PATCH 0/4] perf: Enable symbolic event names Thread-Topic: [RFC][PATCH 0/4] perf: Enable symbolic event names Thread-Index: AdCEpekq3NR8qKNRQzK+8WiR85HcYA== Date: Sat, 2 May 2015 07:02:11 +0000 Message-ID: References: <1430463941-26109-1-git-send-email-sukadev@linux.vnet.ibm.com> Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.197.3] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2546 Lines: 58 On Friday 01 May 2015 12:35 PM, Sukadev Bhattiprolu wrote: > Implement ability to specify Power PMU events by their symbolic event > names rather than raw codes. This approach pulls tables of the Power7 > and Power8 PMU events into the perf source tree and uses these tables > to create aliases for the PMU events. With these aliases users can run: > > perf stat -e PM_1PLUS_PPC_CMPL:ku sleep 1 > or > perf stat -e cpu/PM_VSU_SINGLE/ sleep 1 > > This is an early POC patchset based on discussions with Jiri Olsa, > Michael Ellerman and Ingo Molnar. Lightly tested on Power7 and Power8. > > Can other architectures can implement arch_get_events_table() and similarly > use symoblic event names? Yes, ARC can certainly use this infrastructure. Our hardware conditions are actually 1-8 char strings. So using raw events requires me to first convert the string to ASCII. > > I am also assuming that if the header files like power8-events.h are > easily readable, we don't need the JSON files anymore? > > TODO: > - Maybe translate event names to lower-case? > - Allow perf to process event descriptions (need Andi Kleen's patch) > > > Sukadev Bhattiprolu (4): > perf: Create a table of Power7 PMU events > perf: Create a table of Power8 PMU events > perf/powerpc: Move mfspr and friends to header file > perf: Create aliases for Power PMU events > > tools/perf/arch/powerpc/util/Build | 2 +- > tools/perf/arch/powerpc/util/header.c | 9 +- > tools/perf/arch/powerpc/util/header.h | 9 + > tools/perf/arch/powerpc/util/pmu-events.c | 52 + > tools/perf/arch/powerpc/util/pmu-events.h | 17 + > tools/perf/arch/powerpc/util/power7-events.h | 3315 +++++++++++++ > tools/perf/arch/powerpc/util/power8-events.h | 6408 ++++++++++++++++++++++++++ > tools/perf/util/pmu.c | 77 + > tools/perf/util/pmu.h | 10 + > 9 files changed, 9890 insertions(+), 9 deletions(-) > create mode 100644 tools/perf/arch/powerpc/util/header.h > create mode 100644 tools/perf/arch/powerpc/util/pmu-events.c > create mode 100644 tools/perf/arch/powerpc/util/pmu-events.h > create mode 100644 tools/perf/arch/powerpc/util/power7-events.h > create mode 100644 tools/perf/arch/powerpc/util/power8-events.h > -- 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/