diff options
| author | Puranjay Mohan <puranjay@kernel.org> | 2026-04-27 16:22:59 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-05-11 15:25:24 -0700 |
| commit | 08158c111d7d87d88269d9f873a2fc54b87bcb99 (patch) | |
| tree | b3e82a50caa68ce6b5f0fcf7ab96a4a191a2da11 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 2b6f0a1e4c9e0f618179c4a108249cc4a0442d11 (diff) | |
selftests/bpf: Add BPF batch-timing library
Add a reusable timing library for BPF benchmarks that need to measure
BPF program execution time.
The BPF side (progs/bench_bpf_timing.bpf.h) provides per-CPU sample
arrays and BENCH_BPF_LOOP(), a macro that brackets batch_iters
iterations with bpf_ktime_get_ns() reads and records the elapsed time.
One extra untimed iteration runs afterward for output validation.
The userspace side (benchs/bench_bpf_timing.c) collects samples from
the skeleton BSS, computes percentile statistics, and auto-calibrates
batch_iters to target ~10 ms per batch.
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20260427232313.1582588-3-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
