Thread (9 messages) flat view 9 messages, 4 authors, 2015-05-04

Re: [RFC][PATCH 0/4] perf: Enable symbolic event names

From: Vineet Gupta <hidden>
Date: 2015-05-02 07:02:19
Also in: lkml

On Friday 01 May 2015 12:35 PM, Sukadev Bhattiprolu wrote:=0A=
Implement ability to specify Power PMU events by their symbolic event=0A=
names rather than raw codes. This approach pulls tables of the Power7=0A=
and Power8 PMU events into the perf source tree and uses these tables=0A=
to create aliases for the PMU events. With these aliases users can run:=
=0A=
=0A=
	perf stat -e PM_1PLUS_PPC_CMPL:ku sleep 1=0A=
or=0A=
	perf stat -e cpu/PM_VSU_SINGLE/ sleep 1=0A=
=0A=
This is an early POC patchset based on discussions with Jiri Olsa,=0A=
Michael Ellerman and Ingo Molnar. Lightly tested on Power7 and Power8.=0A=
=0A=
Can other architectures can implement arch_get_events_table() and similar=
ly =0A=
use symoblic event names?=0A=
=0A=
=0A=
Yes, ARC can certainly use this infrastructure. Our hardware conditions are=
=0A=
actually 1-8 char strings. So using raw events requires me to first convert=
 the=0A=
string to ASCII.=0A=
=0A=
=0A=
I am also assuming that if the header files like power8-events.h are=0A=
easily readable, we don't need the JSON files anymore?=0A=
=0A=
TODO:=0A=
	- Maybe translate event names to lower-case?=0A=
	- Allow perf to process event descriptions (need Andi Kleen's patch)=0A=
=0A=
=0A=
Sukadev Bhattiprolu (4):=0A=
  perf: Create a table of Power7 PMU events=0A=
  perf: Create a table of Power8 PMU events=0A=
  perf/powerpc: Move mfspr and friends to header file=0A=
  perf: Create aliases for Power PMU events=0A=
=0A=
 tools/perf/arch/powerpc/util/Build           |    2 +-=0A=
 tools/perf/arch/powerpc/util/header.c        |    9 +-=0A=
 tools/perf/arch/powerpc/util/header.h        |    9 +=0A=
 tools/perf/arch/powerpc/util/pmu-events.c    |   52 +=0A=
 tools/perf/arch/powerpc/util/pmu-events.h    |   17 +=0A=
 tools/perf/arch/powerpc/util/power7-events.h | 3315 +++++++++++++=0A=
 tools/perf/arch/powerpc/util/power8-events.h | 6408 ++++++++++++++++++++=
++++++=0A=
 tools/perf/util/pmu.c                        |   77 +=0A=
 tools/perf/util/pmu.h                        |   10 +=0A=
 9 files changed, 9890 insertions(+), 9 deletions(-)=0A=
 create mode 100644 tools/perf/arch/powerpc/util/header.h=0A=
 create mode 100644 tools/perf/arch/powerpc/util/pmu-events.c=0A=
 create mode 100644 tools/perf/arch/powerpc/util/pmu-events.h=0A=
 create mode 100644 tools/perf/arch/powerpc/util/power7-events.h=0A=
 create mode 100644 tools/perf/arch/powerpc/util/power8-events.h=0A=
=0A=
=0A=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help