]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: Refactor tracepoint tracing programs with libbpf
authorDaniel T. Lee <danieltimlee@gmail.com>
Sun, 23 Aug 2020 08:53:34 +0000 (17:53 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Aug 2020 03:59:35 +0000 (20:59 -0700)
commitf5c2179e70b468e1a231446e0cd6b24e33345b87
tree21b45294c5ef83066fac094eab783df052db0015
parentc9cab0db09dcffef57e4e1721bad3fd399a9f0c3
samples: bpf: Refactor tracepoint tracing programs with libbpf

For the problem of increasing fragmentation of the bpf loader programs,
instead of using bpf_loader.o, which is used in samples/bpf, this
commit refactors the existing tracepoint tracing programs with libbbpf
bpf loader.

    - Adding a tracepoint event and attaching a bpf program to it was done
    through bpf_program_attach().
    - Instead of using the existing BPF MAP definition, MAP definition
    has been refactored with the new BTF-defined MAP format.

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200823085334.9413-4-danieltimlee@gmail.com
samples/bpf/Makefile
samples/bpf/cpustat_kern.c
samples/bpf/cpustat_user.c
samples/bpf/offwaketime_kern.c
samples/bpf/offwaketime_user.c
samples/bpf/syscall_tp_kern.c
samples/bpf/syscall_tp_user.c