diff options
author | Dave Marchevsky <[email protected]> | 2021-11-01 15:43:55 -0700 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2021-11-03 11:25:32 -0700 |
commit | c59765cfd193382b00454b1a4424cb78d4c065e2 (patch) | |
tree | c08e469e99d51288789eedaf3e2400f4663de90a /lib/test_overflow.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 <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Quentin Monnet <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions