summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_perf_branches.c
diff options
context:
space:
mode:
authorMatt Bobrowski <mattbobrowski@google.com>2025-11-20 14:20:59 +0000
committerAlexei Starovoitov <ast@kernel.org>2025-11-21 16:47:58 -0800
commit27746aaf1b20172f0859546c4a3e82eca459f680 (patch)
tree1d458c6000dfabe7d341ac5cc7227d19eb8239e4 /tools/testing/selftests/bpf/progs/test_perf_branches.c
parent878ee3c325bbcfdfa648c5bdf8d81e095fd4b749 (diff)
selftests/bpf: skip test_perf_branches_hw() on unsupported platforms
Gracefully skip the test_perf_branches_hw subtest on platforms that do not support LBR or require specialized perf event attributes to enable branch sampling. For example, AMD's Milan (Zen 3) supports BRS rather than traditional LBR. This requires specific configurations (attr.type = PERF_TYPE_RAW, attr.config = RETIRED_TAKEN_BRANCH_INSTRUCTIONS) that differ from the generic setup used within this test. Notably, it also probably doesn't hold much value to special case perf event configurations for selected micro architectures. Fixes: 67306f84ca78c ("selftests/bpf: Add bpf_read_branch_records() selftest") Signed-off-by: Matt Bobrowski <mattbobrowski@google.com> Acked-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20251120142059.2836181-1-mattbobrowski@google.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_perf_branches.c')
0 files changed, 0 insertions, 0 deletions