summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorSun Jian <sun.jian.kdev@gmail.com>2026-02-28 15:45:55 +0800
committerAndrii Nakryiko <andrii@kernel.org>2026-03-05 15:07:40 -0800
commit7f20d371fd879f5bb9be739c86c9bac13ea920c8 (patch)
tree3c3e12a0901a7d339cb62e9b530b85566923f63f /tools/perf/scripts/python
parent74d3305e620b3c71b414198f9cf9b1609148d277 (diff)
selftests/bpf: bpf_cookie: Make perf_event subtest trigger reliably
The perf_event subtest relies on SW_CPU_CLOCK sampling to trigger the BPF program, but the current CPU burn loop can be too short on slower systems and may fail to generate any overflow sample. This leaves pe_res unchanged and makes the test flaky. Make burn_cpu() take a loop count and use a longer burn only for the perf_event subtest. Also scope perf_event_open() to the current task to avoid wasting samples on unrelated activity. Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/bpf/20260228074555.122950-3-sun.jian.kdev@gmail.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions