]> git.baikalelectronics.ru Git - kernel.git/commit
perf/POWER7: Make generic event translations available in sysfs
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Wed, 23 Jan 2013 06:24:54 +0000 (22:24 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 31 Jan 2013 16:07:50 +0000 (13:07 -0300)
commit79d71a62ea49895ad2dd99f3fa6abd53828d48be
tree73351ee19f0c8fe04815e4f3603329cecbe0b2c8
parentfe4a0622792d12ea451beaea1b0ab3eef516a726
perf/POWER7: Make generic event translations available in sysfs

Make the generic perf events in POWER7 available via sysfs.

$ ls /sys/bus/event_source/devices/cpu/events
branch-instructions
branch-misses
cache-misses
cache-references
cpu-cycles
instructions
stalled-cycles-backend
stalled-cycles-frontend

$ cat /sys/bus/event_source/devices/cpu/events/cache-misses
event=0x400f0

This patch is based on commits that implement this functionality on x86.
Eg:
commit cf1f218f3421a2713b657f6df7a2e8d5654892b7
Author: Jiri Olsa <jolsa@redhat.com>
Date:   Wed Oct 10 14:53:11 2012 +0200

    perf/x86: Make hardware event translations available in sysfs

Changelog:[v2]
[Jiri Osla] Drop EVENT_ID() macro since it is only used once.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: linuxppc-dev@ozlabs.org
Link: http://lkml.kernel.org/r/20130123062454.GD13720@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Documentation/ABI/stable/sysfs-devices-cpu-events [new file with mode: 0644]
arch/powerpc/include/asm/perf_event_server.h
arch/powerpc/perf/core-book3s.c
arch/powerpc/perf/power7-pmu.c