]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - samples/bpf/sampleip_user.c
samples/bpf: move common-purpose trace functions to selftests
authorYonghong Song <yhs@fb.com>
Sun, 29 Apr 2018 05:28:13 +0000 (22:28 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 29 Apr 2018 15:45:54 +0000 (08:45 -0700)
commit28dbf861deacb0321604bf1c5e1ccc34dd215669
treeae98045b9d24ea60e1034b08200d74e762dde8bb
parentde2ff05f48afcde816ff4edb217417f62f624ab5
samples/bpf: move common-purpose trace functions to selftests

There is no functionality change in this patch. The common-purpose
trace functions, including perf_event polling and ksym lookup,
are moved from trace_output_user.c and bpf_load.c to
selftests/bpf/trace_helpers.c so that these function can
be reused later in selftests.

Acked-by: Alexei Starovoitov <ast@fb.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/Makefile
samples/bpf/bpf_load.c
samples/bpf/bpf_load.h
samples/bpf/offwaketime_user.c
samples/bpf/sampleip_user.c
samples/bpf/spintest_user.c
samples/bpf/trace_event_user.c
samples/bpf/trace_output_user.c
tools/testing/selftests/bpf/trace_helpers.c [new file with mode: 0644]
tools/testing/selftests/bpf/trace_helpers.h [new file with mode: 0644]