Skip to content

Commit 4575353

Browse files
ouptonwilldeacon
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> Tested-by: Janne Grunau <j@jannau.net> Link: https://lore.kernel.org/r/20241217212048.3709204-4-oliver.upton@linux.dev Signed-off-by: Will Deacon <will@kernel.org>
1 parent 555c6e9 commit 4575353

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/perf/apple_m1_cpu_pmu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ static const unsigned m1_pmu_perf_map[PERF_COUNT_HW_MAX] = {
168168
PERF_MAP_ALL_UNSUPPORTED,
169169
[PERF_COUNT_HW_CPU_CYCLES] = M1_PMU_PERFCTR_CORE_ACTIVE_CYCLE,
170170
[PERF_COUNT_HW_INSTRUCTIONS] = M1_PMU_PERFCTR_INST_ALL,
171+
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = M1_PMU_PERFCTR_INST_BRANCH,
172+
[PERF_COUNT_HW_BRANCH_MISSES] = M1_PMU_PERFCTR_BRANCH_MISPRED_NONSPEC,
171173
};
172174

173175
/* sysfs definitions */

0 commit comments

Comments
 (0)