powerpc/perf: Add POWER9 alternate PM_RUN_CYC and PM_RUN_INST_CMPL events
authorAnton Blanchard <anton@samba.org>
Sun, 18 Jun 2017 23:51:28 +0000 (09:51 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 12 Jul 2017 02:21:49 +0000 (12:21 +1000)
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>
arch/powerpc/perf/power9-events-list.h
arch/powerpc/perf/power9-pmu.c

index 80204e064362276f4e03ebe1f15752b126d1cfc3..50689180a6c1285f03448069989124c2788b17ad 100644 (file)
@@ -51,8 +51,12 @@ EVENT(PM_DTLB_MISS,                          0x300fc)
 EVENT(PM_ITLB_MISS,                            0x400fc)
 /* Run_Instructions */
 EVENT(PM_RUN_INST_CMPL,                                0x500fa)
+/* Alternate event code for PM_RUN_INST_CMPL */
+EVENT(PM_RUN_INST_CMPL_ALT,                    0x400fa)
 /* Run_cycles */
 EVENT(PM_RUN_CYC,                              0x600f4)
+/* Alternate event code for Run_cycles */
+EVENT(PM_RUN_CYC_ALT,                          0x200f4)
 /* Instruction Dispatched */
 EVENT(PM_INST_DISP,                            0x200f2)
 EVENT(PM_INST_DISP_ALT,                                0x300f2)
index f17435e4a489f3b415b2b3a6f91312273acacd37..2280cf87ff9c9423ad27f84d212dbc1fafe963ca 100644 (file)
@@ -107,6 +107,8 @@ extern struct attribute_group isa207_pmu_format_group;
 /* Table of alternatives, sorted by column 0 */
 static const unsigned int power9_event_alternatives[][MAX_ALT] = {
        { PM_INST_DISP,                 PM_INST_DISP_ALT },
+       { PM_RUN_CYC_ALT,               PM_RUN_CYC },
+       { PM_RUN_INST_CMPL_ALT,         PM_RUN_INST_CMPL },
 };
 
 static int power9_get_alternatives(u64 event, unsigned int flags, u64 alt[])