Skip to content

Commit 984a9f1

Browse files
ouptonjannau
authored andcommitted
drivers/perf: apple_m1: Map generic branch events
Map the generic perf events for branch prediction stats to the corresponding hardware events. Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1 parent 5f86830 commit 984a9f1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/perf/apple_m1_cpu_pmu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ static const unsigned m1_pmu_perf_map[PERF_COUNT_HW_MAX] = {
170170
PERF_MAP_ALL_UNSUPPORTED,
171171
[PERF_COUNT_HW_CPU_CYCLES] = M1_PMU_PERFCTR_CORE_ACTIVE_CYCLE,
172172
[PERF_COUNT_HW_INSTRUCTIONS] = M1_PMU_PERFCTR_INST_ALL,
173+
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = M1_PMU_PERFCTR_INST_BRANCH,
174+
[PERF_COUNT_HW_BRANCH_MISSES] = M1_PMU_PERFCTR_BRANCH_MISPRED_NONSPEC,
173175
};
174176

175177
/* sysfs definitions */

0 commit comments

Comments
 (0)