aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorJiri Olsa <[email protected]>2023-01-16 11:10:09 +0100
committerAlexei Starovoitov <[email protected]>2023-01-19 17:07:40 -0800
commit6a5f2d6ee8d515d5912e33d63a7386d03854a655 (patch)
tree143f3ba40e705b2c470f90c491ecd38935581482 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parentedac4b5b185ed3d2717b8267e28e0a1187c0bc08 (diff)
bpf: Change modules resolving for kprobe multi link
We currently use module_kallsyms_on_each_symbol that iterates all modules/symbols and we try to lookup each such address in user provided symbols/addresses to get list of used modules. This fix instead only iterates provided kprobe addresses and calls __module_address on each to get list of used modules. This turned out to be simpler and also bit faster. On my setup with workload (executed 10 times): # test_progs -t kprobe_multi_bench_attach/modules Current code: Performance counter stats for './test.sh' (5 runs): 76,081,161,596 cycles:k ( +- 0.47% ) 18.3867 +- 0.0992 seconds time elapsed ( +- 0.54% ) With the fix: Performance counter stats for './test.sh' (5 runs): 74,079,889,063 cycles:k ( +- 0.04% ) 17.8514 +- 0.0218 seconds time elapsed ( +- 0.12% ) Signed-off-by: Jiri Olsa <[email protected]> Reviewed-by: Zhen Lei <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions