diff options
author | Dave Marchevsky <davemarchevsky@fb.com> | 2021-11-01 15:43:55 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-11-03 11:25:32 -0700 |
commit | c59765cfd193382b00454b1a4424cb78d4c065e2 (patch) | |
tree | c08e469e99d51288789eedaf3e2400f4663de90a /tools/testing/selftests/bpf/prog_tests/exhandler.c | |
parent | 60f270753960291895cdd07d360c4e09c56c4596 (diff) |
bpftool: Use bpf_obj_get_info_by_fd directly
To prepare for impending deprecation of libbpf's
bpf_program__get_prog_info_linear, migrate uses of this function to use
bpf_obj_get_info_by_fd.
Since the profile_target_name and dump_prog_id_as_func_ptr helpers were
only looking at the first func_info, avoid grabbing the rest to save a
malloc. For do_dump, add a more full-featured helper, but avoid
free/realloc of buffer when possible for multi-prog dumps.
Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20211101224357.2651181-3-davemarchevsky@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/exhandler.c')
0 files changed, 0 insertions, 0 deletions