From: Ian Rogers Date: Sat, 11 Mar 2023 06:57:50 +0000 (-0800) Subject: perf build: Switch libpfm4 to opt-out rather than opt-in X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d7c4f89af1611530562554a237069deb2b03b312;p=linux.git perf build: Switch libpfm4 to opt-out rather than opt-in If libpfm4 passes the feature test, it would be nice to have it enabled rather than also requiring the LIBPFM4=1 build flag. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index ac8a206acf870..2caee19e3e9ae 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -1138,7 +1138,7 @@ ifdef LIBCLANGLLVM endif endif -ifdef LIBPFM4 +ifndef NO_LIBPFM4 $(call feature_check,libpfm4) ifeq ($(feature-libpfm4), 1) CFLAGS += -DHAVE_LIBPFM @@ -1147,7 +1147,6 @@ ifdef LIBPFM4 $(call detected,CONFIG_LIBPFM4) else msg := $(warning libpfm4 not found, disables libpfm4 support. Please install libpfm4-dev); - NO_LIBPFM4 := 1 endif endif diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index a35bc995d5d8f..3e06915f6bd06 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -122,7 +122,7 @@ include ../scripts/utilities.mak # generated from the kernel .tbl or unistd.h files and use, if available, libaudit # for doing the conversions to/from strings/id. # -# Define LIBPFM4 to enable libpfm4 events extension. +# Define NO_LIBPFM4 to disable libpfm4 events extension. # # Define NO_LIBDEBUGINFOD if you do not want support debuginfod # diff --git a/tools/perf/tests/make b/tools/perf/tests/make index 52b9b6895da56..ba09a8b4ffb4e 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -94,7 +94,7 @@ make_with_coresight := CORESIGHT=1 make_no_sdt := NO_SDT=1 make_no_syscall_tbl := NO_SYSCALL_TABLE=1 make_with_clangllvm := LIBCLANGLLVM=1 -make_with_libpfm4 := LIBPFM4=1 +make_no_libpfm4 := NO_LIBPFM4=1 make_with_gtk2 := GTK2=1 make_tags := tags make_cscope := cscope @@ -160,7 +160,7 @@ run += make_no_syscall_tbl run += make_with_babeltrace run += make_with_coresight run += make_with_clangllvm -run += make_with_libpfm4 +run += make_no_libpfm4 run += make_help run += make_doc run += make_perf_o