samples/bpf: make tracing programs to be more CO-RE centric
authorDaniel T. Lee <danieltimlee@gmail.com>
Fri, 18 Aug 2023 09:01:15 +0000 (18:01 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 21 Aug 2023 22:39:09 +0000 (15:39 -0700)
commit11430421b440427e10dfb4bd2bdc418fab0ff166
treef156649f07571863b44b63965dc80f318ef4cff5
parent02dabc247ad68b41758bf39f11e2d682b8b32dd7
samples/bpf: make tracing programs to be more CO-RE centric

The existing tracing programs have been developed for a considerable
period of time and, as a result, do not properly incorporate the
features of the current libbpf, such as CO-RE. This is evident in
frequent usage of functions like PT_REGS* and the persistence of "hack"
methods using underscore-style bpf_probe_read_kernel from the past.

These programs are far behind the current level of libbpf and can
potentially confuse users. Therefore, this commit aims to convert the
outdated BPF programs to be more CO-RE centric.

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Link: https://lore.kernel.org/r/20230818090119.477441-6-danieltimlee@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/offwaketime.bpf.c
samples/bpf/test_overhead_kprobe.bpf.c
samples/bpf/tracex1.bpf.c
samples/bpf/tracex5.bpf.c