-
- Downloads
samples/bpf: convert to vmlinux.h with tracing programs
This commit replaces separate headers with a single vmlinux.h to tracing programs. Thanks to that, we no longer need to define the argument structure for tracing programs directly. For example, argument for the sched_switch tracpepoint (sched_switch_args) can be replaced with the vmlinux.h provided trace_event_raw_sched_switch. Additional defines have been added to the BPF program either directly or through the inclusion of net_shared.h. Defined values are PERF_MAX_STACK_DEPTH, IFNAMSIZ constants and __stringify() macro. This change enables the BPF program to access internal structures with BTF generated "vmlinux.h" header. Signed-off-by:Daniel T. Lee <danieltimlee@gmail.com> Link: https://lore.kernel.org/r/20230818090119.477441-3-danieltimlee@gmail.com Signed-off-by:
Alexei Starovoitov <ast@kernel.org>
Showing
- samples/bpf/net_shared.h 2 additions, 0 deletionssamples/bpf/net_shared.h
- samples/bpf/offwaketime_kern.c 6 additions, 15 deletionssamples/bpf/offwaketime_kern.c
- samples/bpf/spintest_kern.c 6 additions, 4 deletionssamples/bpf/spintest_kern.c
- samples/bpf/test_overhead_tp.bpf.c 2 additions, 27 deletionssamples/bpf/test_overhead_tp.bpf.c
- samples/bpf/tracex1_kern.c 2 additions, 3 deletionssamples/bpf/tracex1_kern.c
- samples/bpf/tracex3_kern.c 1 addition, 3 deletionssamples/bpf/tracex3_kern.c
- samples/bpf/tracex4_kern.c 1 addition, 2 deletionssamples/bpf/tracex4_kern.c
- samples/bpf/tracex5_kern.c 3 additions, 4 deletionssamples/bpf/tracex5_kern.c
- samples/bpf/tracex6_kern.c 1 addition, 2 deletionssamples/bpf/tracex6_kern.c
- samples/bpf/tracex7_kern.c 1 addition, 2 deletionssamples/bpf/tracex7_kern.c
Loading
Please register or sign in to comment