summaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile.perf
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2023-03-10 22:57:42 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-03-14 08:29:46 -0300
commita980755beb5aca9002e1c95ba519b83a44242b5b (patch)
tree296822dd5a9b4c5244154acc411bdc0e8de0a2fc /tools/perf/Makefile.perf
parent7a9b223ca0761a7c7c72e569b86b84a907aa0f92 (diff)
downloadlinux-a980755beb5aca9002e1c95ba519b83a44242b5b.tar.gz
linux-a980755beb5aca9002e1c95ba519b83a44242b5b.tar.bz2
linux-a980755beb5aca9002e1c95ba519b83a44242b5b.zip
perf build: Make BUILD_BPF_SKEL default, rename to NO_BPF_SKEL
BPF skeleton support is now key to a number of perf features. Rather than making it so that BPF support must be enabled for the build, make this the default and error if the build lacks a clang and libbpf that are sufficient. To avoid the error and build without BPF skeletons the NO_BPF_SKEL=1 flag can be used. Add a build-options flag to 'perf version' to enable detection of the BPF skeleton support and use this in the offcpu shell test. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andres Freund <andres@anarazel.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Martin Liška <mliska@suse.cz> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Pavithra Gurushankar <gpavithrasha@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Monnet <quentin@isovalent.com> Cc: Roberto Sassu <roberto.sassu@huawei.com> Cc: Stephane Eranian <eranian@google.com> Cc: Tiezhu Yang <yangtiezhu@loongson.cn> Cc: Tom Rix <trix@redhat.com> Cc: Yang Jihong <yangjihong1@huawei.com> Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile.perf')
-rw-r--r--tools/perf/Makefile.perf8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 2fcee585b225..283ee4f56234 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -126,7 +126,7 @@ include ../scripts/utilities.mak
#
# Define NO_LIBDEBUGINFOD if you do not want support debuginfod
#
-# Define BUILD_BPF_SKEL to enable BPF skeletons
+# Define NO_BPF_SKEL to disable BPF skeletons
#
# As per kernel Makefile, avoid funny character set dependencies
@@ -1055,7 +1055,7 @@ SKELETONS += $(SKEL_OUT)/kwork_trace.skel.h
$(SKEL_TMP_OUT) $(LIBAPI_OUTPUT) $(LIBBPF_OUTPUT) $(LIBPERF_OUTPUT) $(LIBSUBCMD_OUTPUT) $(LIBSYMBOL_OUTPUT):
$(Q)$(MKDIR) -p $@
-ifdef BUILD_BPF_SKEL
+ifndef NO_BPF_SKEL
BPFTOOL := $(SKEL_TMP_OUT)/bootstrap/bpftool
BPF_INCLUDE := -I$(SKEL_TMP_OUT)/.. -I$(LIBBPF_INCLUDE)
@@ -1088,11 +1088,11 @@ bpf-skel: $(SKELETONS)
.PRECIOUS: $(SKEL_TMP_OUT)/%.bpf.o
-else # BUILD_BPF_SKEL
+else # NO_BPF_SKEL
bpf-skel:
-endif # BUILD_BPF_SKEL
+endif # NO_BPF_SKEL
bpf-skel-clean:
$(call QUIET_CLEAN, bpf-skel) $(RM) -r $(SKEL_TMP_OUT) $(SKELETONS)