diff options
author | Anton Blanchard <anton@samba.org> | 2017-06-18 19:51:28 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-07-11 22:21:49 -0400 |
commit | 3f0bd8dad0db73f5d71b355aec5ab33b374260ba (patch) | |
tree | fc2e88152e4af97191bd36985cc934a7213af95d | |
parent | 20dd4c624d25156d5ec3345bbb690b98175ef879 (diff) |
powerpc/perf: Add POWER9 alternate PM_RUN_CYC and PM_RUN_INST_CMPL events
Similar to POWER8, POWER9 can count run cycles and run instructions
completed on more than one PMU.
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/perf/power9-events-list.h | 4 | ||||
-rw-r--r-- | arch/powerpc/perf/power9-pmu.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/perf/power9-events-list.h b/arch/powerpc/perf/power9-events-list.h index 80204e064362..50689180a6c1 100644 --- a/arch/powerpc/perf/power9-events-list.h +++ b/arch/powerpc/perf/power9-events-list.h | |||
@@ -51,8 +51,12 @@ EVENT(PM_DTLB_MISS, 0x300fc) | |||
51 | EVENT(PM_ITLB_MISS, 0x400fc) | 51 | EVENT(PM_ITLB_MISS, 0x400fc) |
52 | /* Run_Instructions */ | 52 | /* Run_Instructions */ |
53 | EVENT(PM_RUN_INST_CMPL, 0x500fa) | 53 | EVENT(PM_RUN_INST_CMPL, 0x500fa) |
54 | /* Alternate event code for PM_RUN_INST_CMPL */ | ||
55 | EVENT(PM_RUN_INST_CMPL_ALT, 0x400fa) | ||
54 | /* Run_cycles */ | 56 | /* Run_cycles */ |
55 | EVENT(PM_RUN_CYC, 0x600f4) | 57 | EVENT(PM_RUN_CYC, 0x600f4) |
58 | /* Alternate event code for Run_cycles */ | ||
59 | EVENT(PM_RUN_CYC_ALT, 0x200f4) | ||
56 | /* Instruction Dispatched */ | 60 | /* Instruction Dispatched */ |
57 | EVENT(PM_INST_DISP, 0x200f2) | 61 | EVENT(PM_INST_DISP, 0x200f2) |
58 | EVENT(PM_INST_DISP_ALT, 0x300f2) | 62 | EVENT(PM_INST_DISP_ALT, 0x300f2) |
diff --git a/arch/powerpc/perf/power9-pmu.c b/arch/powerpc/perf/power9-pmu.c index f17435e4a489..2280cf87ff9c 100644 --- a/arch/powerpc/perf/power9-pmu.c +++ b/arch/powerpc/perf/power9-pmu.c | |||
@@ -107,6 +107,8 @@ extern struct attribute_group isa207_pmu_format_group; | |||
107 | /* Table of alternatives, sorted by column 0 */ | 107 | /* Table of alternatives, sorted by column 0 */ |
108 | static const unsigned int power9_event_alternatives[][MAX_ALT] = { | 108 | static const unsigned int power9_event_alternatives[][MAX_ALT] = { |
109 | { PM_INST_DISP, PM_INST_DISP_ALT }, | 109 | { PM_INST_DISP, PM_INST_DISP_ALT }, |
110 | { PM_RUN_CYC_ALT, PM_RUN_CYC }, | ||
111 | { PM_RUN_INST_CMPL_ALT, PM_RUN_INST_CMPL }, | ||
110 | }; | 112 | }; |
111 | 113 | ||
112 | static int power9_get_alternatives(u64 event, unsigned int flags, u64 alt[]) | 114 | static int power9_get_alternatives(u64 event, unsigned int flags, u64 alt[]) |