diff options
author | Yonghong Song <yonghong.song@linux.dev> | 2024-03-25 21:15:08 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-03-28 18:31:41 -0700 |
commit | 9475dacb75e0b5efae086dc904f4d27c31f15157 (patch) | |
tree | 134bb369d3b7db7ce1d8b226a2fdee42a09d21b3 /tools/testing/selftests/bpf/trace_helpers.h | |
parent | d1320649346c36c5ba7b579533bf518960ef71e1 (diff) |
selftests/bpf: Refactor trace helper func load_kallsyms_local()
Refactor trace helper function load_kallsyms_local() such that
it invokes a common function with a compare function as input.
The common function will be used later for other local functions.
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240326041508.1199239-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/trace_helpers.h')
-rw-r--r-- | tools/testing/selftests/bpf/trace_helpers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/trace_helpers.h b/tools/testing/selftests/bpf/trace_helpers.h index 04fd1da7079d..9da0d0484eed 100644 --- a/tools/testing/selftests/bpf/trace_helpers.h +++ b/tools/testing/selftests/bpf/trace_helpers.h @@ -13,6 +13,8 @@ struct ksym { }; struct ksyms; +typedef int (*ksym_cmp_t)(const void *p1, const void *p2); + int load_kallsyms(void); struct ksym *ksym_search(long key); long ksym_get_addr(const char *name); |