diff options
| author | Alexei Starovoitov <[email protected]> | 2022-02-09 15:19:58 -0800 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2022-02-10 23:31:51 +0100 |
| commit | 6fe65f1b4db3fff305896e997c2804b7b42236ce (patch) | |
| tree | 3ce3bc5eba4cef9417e0416db1cfec1fc1f24c8e /tools/perf/scripts/python/stackcollapse.py | |
| parent | b1d18a7574d0df5eb4117c14742baf8bc2b9bb74 (diff) | |
libbpf: Prepare light skeleton for the kernel.
Prepare light skeleton to be used in the kernel module and in the user space.
The look and feel of lskel.h is mostly the same with the difference that for
user space the skel->rodata is the same pointer before and after skel_load
operation, while in the kernel the skel->rodata after skel_open and the
skel->rodata after skel_load are different pointers.
Typical usage of skeleton remains the same for kernel and user space:
skel = my_bpf__open();
skel->rodata->my_global_var = init_val;
err = my_bpf__load(skel);
err = my_bpf__attach(skel);
// access skel->rodata->my_global_var;
// access skel->bss->another_var;
Signed-off-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions