mirror-linux/tools/testing/selftests/bpf/benchs
Ihor Solodrai a1a771bd64 selftests/bpf: Refactor bpf_get_ksyms() trace helper
ASAN reported a memory leak in bpf_get_ksyms(): it allocates a struct
ksyms internally and never frees it.

Move struct ksyms to trace_helpers.h and return it from the
bpf_get_ksyms(), giving ownership to the caller. Add filtered_syms and
filtered_cnt fields to the ksyms to hold the filtered array of
symbols, previously returned by bpf_get_ksyms().

Fixup the call sites: kprobe_multi_test and bench_trigger.

Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20260223190736.649171-10-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-02-24 08:19:49 -08:00
..
bench_bloom_filter_map.c selftests/bpf: Set the default value of consumer_cnt as 0 2023-06-19 13:26:43 -07:00
bench_bpf_crypto.c selftests: bpf: crypto: add benchmark for crypto functions 2024-04-24 16:01:10 -07:00
bench_bpf_hashmap_full_update.c selftests/bpf: Set the default value of consumer_cnt as 0 2023-06-19 13:26:43 -07:00
bench_bpf_hashmap_lookup.c selftests/bpf: Set the default value of consumer_cnt as 0 2023-06-19 13:26:43 -07:00
bench_bpf_loop.c selftests/bpf: Set the default value of consumer_cnt as 0 2023-06-19 13:26:43 -07:00
bench_count.c selftests/bpf: Set the default value of consumer_cnt as 0 2023-06-19 13:26:43 -07:00
bench_htab_mem.c selftests/bpf: Close the file descriptor to avoid resource leaks 2025-04-22 14:29:58 -07:00
bench_local_storage.c selftests/bpf: Set the default value of consumer_cnt as 0 2023-06-19 13:26:43 -07:00
bench_local_storage_create.c selftests/bpf: Remove second semicolon 2024-03-15 14:53:56 +01:00
bench_local_storage_rcu_tasks_trace.c selftests/bpf: Set the default value of consumer_cnt as 0 2023-06-19 13:26:43 -07:00
bench_lpm_trie_map.c selftests/bpf: Add LPM trie microbenchmarks 2025-08-27 17:28:14 -07:00
bench_rename.c selftests/bpf: Set the default value of consumer_cnt as 0 2023-06-19 13:26:43 -07:00
bench_ringbufs.c selftests/bpf/benchs: Add overwrite mode benchmark for BPF ring buffer 2025-10-27 19:47:32 -07:00
bench_sockmap.c selftests/bpf: Fix incorrect array size calculation 2025-09-09 09:23:47 -07:00
bench_strncmp.c selftests/bpf: Set the default value of consumer_cnt as 0 2023-06-19 13:26:43 -07:00
bench_trigger.c selftests/bpf: Refactor bpf_get_ksyms() trace helper 2026-02-24 08:19:49 -08:00
run_bench_bloom_filter_map.sh
run_bench_bpf_hashmap_full_update.sh selftest/bpf/benchs: Fix a typo in bpf_hashmap_full_update 2023-02-15 16:29:31 -08:00
run_bench_bpf_loop.sh
run_bench_htab_mem.sh selftests/bpf: Add benchmark for bpf memory allocator 2023-07-05 18:36:19 -07:00
run_bench_local_storage.sh
run_bench_local_storage_rcu_tasks_trace.sh selftest/bpf/benchs: Make quiet option common 2023-02-15 16:29:31 -08:00
run_bench_rename.sh selftests/bpf: Clean up fmod_ret in bench_rename test script 2023-08-14 18:43:04 +02:00
run_bench_ringbufs.sh selftests/bpf: Add perfbuf multi-producer benchmark 2026-01-20 11:37:25 -08:00
run_bench_strncmp.sh
run_bench_trigger.sh selftests/bpf: add benchmark testing for kprobe-multi-all 2025-09-04 09:00:25 -07:00
run_bench_uprobes.sh selftests/bpf: Add 5-byte NOP uprobe trigger benchmark 2025-04-18 09:03:45 +02:00
run_common.sh