Skip to content

Commit 9327f0e

Browse files
committed
perf build: Require at least clang 16.0.6 to build BPF skeletons
Howard reported problems using perf features that use BPF: perf $ clang -v Debian clang version 15.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /bin Found candidate GCC installation: /bin/../lib/gcc/x86_64-linux-gnu/12 Selected GCC installation: /bin/../lib/gcc/x86_64-linux-gnu/12 Candidate multilib: .;@m64 Selected multilib: .;@m64 perf $ ./perf trace -e write --max-events=1 libbpf: prog 'sys_enter_rename': BPF program load failed: Permission denied libbpf: prog 'sys_enter_rename': -- BEGIN PROG LOAD LOG -- 0: R1=ctx() R10=fp0 But it works with: perf $ clang -v Debian clang version 16.0.6 (15~deb12u1) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /bin Found candidate GCC installation: /bin/../lib/gcc/x86_64-linux-gnu/12 Selected GCC installation: /bin/../lib/gcc/x86_64-linux-gnu/12 Candidate multilib: .;@m64 Selected multilib: .;@m64 perf $ ./perf trace -e write --max-events=1 0.000 ( 0.009 ms): gmain/1448 write(fd: 4, buf: \1\0\0\0\0\0\0\0, count: 8) = 8 (kworker/0:0-eve) perf $ So lets make that the required version, if you happen to have a slightly older version where this work, please report so that we can adjust the minimum required version. Reported-by: Howard Chu <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alan Maguire <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/lkml/ZuGL9ROeTV2uXoSp@x1 Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 4c1af9b commit 9327f0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/perf/Makefile.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,8 @@ ifeq ($(BUILD_BPF_SKEL),1)
705705
BUILD_BPF_SKEL := 0
706706
else
707707
CLANG_VERSION := $(shell $(CLANG) --version | head -1 | sed 's/.*clang version \([[:digit:]]\+.[[:digit:]]\+.[[:digit:]]\+\).*/\1/g')
708-
ifeq ($(call version-lt3,$(CLANG_VERSION),12.0.1),1)
709-
$(warning Warning: Disabled BPF skeletons as reliable BTF generation needs at least $(CLANG) version 12.0.1)
708+
ifeq ($(call version-lt3,$(CLANG_VERSION),16.0.6),1)
709+
$(warning Warning: Disabled BPF skeletons as at least $(CLANG) version 16.0.6 is reported to be a working setup with the current of BPF based perf features)
710710
BUILD_BPF_SKEL := 0
711711
endif
712712
endif

0 commit comments

Comments
 (0)