Skip to content

Commit 7687710

Browse files
ouptonjannau
authored andcommitted
drivers/perf: apple_m1: Map a few more PMUv3 events
Map some more PMUv3 events onto hardware so 'perf stat' in a KVM VM can show some useful information (e.g. IPC, branch prediction rate). Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1 parent 51cc5fa commit 7687710

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/perf/apple_m1_cpu_pmu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ static const unsigned m1_pmu_perf_map[PERF_COUNT_HW_MAX] = {
180180

181181
static const unsigned int m1_pmu_pmceid_map[ARMV8_PMUV3_MAX_COMMON_EVENTS] = {
182182
[0 ... ARMV8_PMUV3_MAX_COMMON_EVENTS - 1] = HW_OP_UNSUPPORTED,
183+
M1_PMUV3_EVENT_MAP(INST_RETIRED, INST_ALL),
183184
M1_PMUV3_EVENT_MAP(CPU_CYCLES, CORE_ACTIVE_CYCLE),
185+
M1_PMUV3_EVENT_MAP(BR_RETIRED, INST_BRANCH),
186+
M1_PMUV3_EVENT_MAP(BR_MIS_PRED_RETIRED, BRANCH_MISPRED_NONSPEC),
184187
};
185188

186189
/* sysfs definitions */

0 commit comments

Comments
 (0)