[PATCH v12 04/19] perf build: Record the features checked outside FEATURE_TESTS

From: Arnaldo Carvalho de Melo

Date: Mon Nov 23 2026 - 17:00:59 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

llvm-perf and rust are in FEATURE_DISPLAY but not in FEATURE_TESTS, and
jvmti and jvmti-cmlr are in neither list: they can't be part of the
test-all fast path, which sets every FEATURE_TESTS entry to 1 when
test-all.c builds. Since FEATURE-DUMP is written from FEATURE_TESTS
only, a FEATURES_DUMP= build, as used by build-test, never sees them and
silently builds without libLLVM, the rust workloads and the jvmti agent.

Record these four in the dump after the regular feature checks have
run, from a list of their own, so that customizing FEATURE_DISPLAY does
not change what the dump carries.

Fixes: 206dcfca1f5cfac3 ("perf build: Autodetect minimum required llvm-dev version")
Fixes: 3f5dfa472ea6771c ("tools build: Fix rust feature detection")
Fixes: d4dfdf00d43e017d ("perf jvmti: Plug compilation into perf build")
Fixes: dd1d0044dd1c1bf8 ("perf jvmti: Separate jvmti cmlr check")
Cc: James Clark <james.clark@xxxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/Makefile.config | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index aed2e952c8f3710a..88b8bc13a578a24f 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1369,3 +1369,10 @@ endif
# tests.
$(shell rm -f $(FEATURE_DUMP_FILENAME))
$(foreach feat,$(FEATURE_TESTS),$(shell echo "$(call feature_assign,$(feat))" >> $(FEATURE_DUMP_FILENAME)))
+# Features checked outside FEATURE_TESTS aren't part of the test-all fast
+# path, so they have to be checked explicitly and recorded here too,
+# otherwise a FEATURES_DUMP= build silently disables them.
+FEATURE_DUMP_EXTRA := llvm-perf rust jvmti jvmti-cmlr
+ifeq ($(FEATURES_DUMP),)
+$(foreach feat,$(FEATURE_DUMP_EXTRA),$(shell echo "$(call feature_assign,$(feat))" >> $(FEATURE_DUMP_FILENAME)))
+endif
--
2.56.0