diff options
author | Daniel T. Lee <danieltimlee@gmail.com> | 2020-11-24 09:03:08 +0000 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2020-11-26 19:33:36 -0800 |
commit | c6497df0ddc3363c2c940d92c3af0b2620477003 (patch) | |
tree | af1e28c619db0869ce548a670c9a24faf754a2d0 /samples/bpf/Makefile | |
parent | 763af200d6160b2f79f45cbf9a85b8dc6e20f2c7 (diff) | |
download | linux-stable-c6497df0ddc3363c2c940d92c3af0b2620477003.tar.gz linux-stable-c6497df0ddc3363c2c940d92c3af0b2620477003.tar.bz2 linux-stable-c6497df0ddc3363c2c940d92c3af0b2620477003.zip |
samples: bpf: Refactor test_overhead program with libbpf
This commit refactors the existing program with libbpf bpf loader.
Since the kprobe, tracepoint and raw_tracepoint bpf program can be
attached with single bpf_program__attach() interface, so the
corresponding function of libbpf is used here.
Rather than specifying the number of cpus inside the code, this commit
uses the number of available cpus with _SC_NPROCESSORS_ONLN.
Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20201124090310.24374-6-danieltimlee@gmail.com
Diffstat (limited to 'samples/bpf/Makefile')
-rw-r--r-- | samples/bpf/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 09a249477554..25380e04897e 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -78,7 +78,7 @@ lathist-objs := lathist_user.o offwaketime-objs := offwaketime_user.o $(TRACE_HELPERS) spintest-objs := spintest_user.o $(TRACE_HELPERS) map_perf_test-objs := map_perf_test_user.o -test_overhead-objs := bpf_load.o test_overhead_user.o +test_overhead-objs := test_overhead_user.o test_cgrp2_array_pin-objs := test_cgrp2_array_pin.o test_cgrp2_attach-objs := test_cgrp2_attach.o test_cgrp2_sock-objs := test_cgrp2_sock.o |