diff options
author | Mykyta Yatsenko <yatsenko@meta.com> | 2025-03-03 13:57:51 +0000 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2025-03-15 11:48:28 -0700 |
commit | 1315c28ed8095108f90dfe882e9e1e68a101fc75 (patch) | |
tree | fbec713a8e155211bdf6c6169c7595c0bd91740f /scripts/gdb/linux/utils.py | |
parent | 9a9e347835d007f279274d175b9fcd9b47d9ee50 (diff) |
libbpf: Split bpf object load into prepare/load
Introduce bpf_object__prepare API: additional intermediate preparation
step that performs ELF processing, relocations, prepares final state of
BPF program instructions (accessible with bpf_program__insns()), creates
and (potentially) pins maps, and stops short of loading BPF programs.
We anticipate few use cases for this API, such as:
* Use prepare to initialize bpf_token, without loading freplace
programs, unlocking possibility to lookup BTF of other programs.
* Execute prepare to obtain finalized BPF program instructions without
loading programs, enabling tools like veristat to process one program at
a time, without incurring cost of ELF parsing and processing.
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250303135752.158343-4-mykyta.yatsenko5@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions