diff options
author | Song Liu <songliubraving@fb.com> | 2021-02-25 15:43:18 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-02-26 11:51:48 -0800 |
commit | 4b0d2d4156cfb9f27d8e52a33d3522a78002fca1 (patch) | |
tree | 30b0300e720fb600c6a43bf121720820244b890c /tools/bpf | |
parent | c540957a4d1d13934e93e53ce3056ac4108ffc29 (diff) | |
download | linux-4b0d2d4156cfb9f27d8e52a33d3522a78002fca1.tar.gz linux-4b0d2d4156cfb9f27d8e52a33d3522a78002fca1.tar.bz2 linux-4b0d2d4156cfb9f27d8e52a33d3522a78002fca1.zip |
bpf: runqslower: Prefer using local vmlimux to generate vmlinux.h
Update the Makefile to prefer using $(O)/vmlinux, $(KBUILD_OUTPUT)/vmlinux
(for selftests) or ../../../vmlinux. These two files should have latest
definitions for vmlinux.h.
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210225234319.336131-6-songliubraving@fb.com
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/runqslower/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile index 9d9fb6209be1..c96ba90c6f01 100644 --- a/tools/bpf/runqslower/Makefile +++ b/tools/bpf/runqslower/Makefile @@ -16,7 +16,10 @@ CFLAGS := -g -Wall # Try to detect best kernel BTF source KERNEL_REL := $(shell uname -r) -VMLINUX_BTF_PATHS := /sys/kernel/btf/vmlinux /boot/vmlinux-$(KERNEL_REL) +VMLINUX_BTF_PATHS := $(if $(O),$(O)/vmlinux) \ + $(if $(KBUILD_OUTPUT),$(KBUILD_OUTPUT)/vmlinux) \ + ../../../vmlinux /sys/kernel/btf/vmlinux \ + /boot/vmlinux-$(KERNEL_REL) VMLINUX_BTF_PATH := $(or $(VMLINUX_BTF),$(firstword \ $(wildcard $(VMLINUX_BTF_PATHS)))) |