From: Ian Rogers Date: Wed, 22 Mar 2023 18:31:08 +0000 (-0700) Subject: perf build: Add warning for when vmlinux.h generation fails X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1d7966547e11b1355f88086c26eb2086f6ea4770;p=linux.git perf build: Add warning for when vmlinux.h generation fails The warning advises on the NO_BPF_SKEL=1 option. Suggested-by: Stephen Rothwell Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230322183108.1380882-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index ed6b6a070f799..48aba186ceb50 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -1072,7 +1072,11 @@ VMLINUX_BTF ?= $(abspath $(firstword $(wildcard $(VMLINUX_BTF_PATHS)))) $(SKEL_OUT)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) ifeq ($(VMLINUX_H),) - $(QUIET_GEN)$(BPFTOOL) btf dump file $< format c > $@ + $(QUIET_GEN)$(BPFTOOL) btf dump file $< format c > $@ || \ + (echo "Failure to generate vmlinux.h needed for the recommended BPF skeleton support." && \ + echo "To disable this use the build option NO_BPF_SKEL=1." && \ + echo "Alternatively point at a pre-generated vmlinux.h with VMLINUX_H=." && \ + false) else $(Q)cp "$(VMLINUX_H)" $@ endif