]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Export Power8 generic and cache events to sysfs
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Mon, 11 Jan 2016 22:55:26 +0000 (14:55 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 10 Mar 2016 11:56:05 +0000 (22:56 +1100)
commit6da924ae0cca5bb1ecf113167e9c6feb5ad67d45
tree7cbe66270a412a5a8b886685d48294580029aef3
parent86fc41deff03d21a2aecf1bea4455594585ff797
powerpc/perf: Export Power8 generic and cache events to sysfs

Power8 supports a large number of events in each susbystem so when a
user runs:

perf stat -e branch-instructions sleep 1
perf stat -e L1-dcache-loads sleep 1

it is not clear as to which PMU events were monitored.

Export the generic hardware and cache perf events for Power8 to sysfs,
so users can precisely determine the PMU event monitored by the generic
event.

Eg:
cat /sys/bus/event_source/devices/cpu/events/branch-instructions
event=0x10068

$ cat /sys/bus/event_source/devices/cpu/events/L1-dcache-loads
event=0x100ee

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/perf_event_server.h
arch/powerpc/perf/power8-events-list.h [new file with mode: 0644]
arch/powerpc/perf/power8-pmu.c