[PATCH v7 08/14] perf build: Move libsymbol dependency out of prepare step
From: Ian Rogers
Date: Mon May 18 2026 - 11:58:45 EST
The prepare step is a large serialization point before parallel
sub-makes build the perf tool. The libsymbol headers are used in the
bench and util libraries. Move the libsymbol dependency out of the
prepare step and into the dependencies for those targets to avoid it
being a source of serialization in the prepare step.
Tested-by: James Clark <james.clark@xxxxxxxxxx>
Assisted-by: Gemini:gemini-3.1-pro-preview
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/Makefile.perf | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 876065a02de6..96a68723109f 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -558,7 +558,7 @@ $(LIBPMU_EVENTS): $(LIBPMU_EVENTS_IN)
# The $(LIBPERF_UTIL) dependency is to ensure bpftool and vmlinux.h
# aren't racily built for bench/bpf_skel/bench_uprobe.bpf.c
-$(LIBPERF_BENCH_IN): FORCE prepare | $(LIBPERF_UTIL)
+$(LIBPERF_BENCH_IN): FORCE prepare $(LIBSYMBOL) | $(LIBPERF_UTIL)
$(Q)$(MAKE) $(build)=perf-bench
$(LIBPERF_BENCH): $(LIBPERF_BENCH_IN)
@@ -576,7 +576,7 @@ $(LIBPERF_UI_IN): FORCE prepare
$(LIBPERF_UI): $(LIBPERF_UI_IN)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $<
-$(LIBPERF_UTIL_IN): FORCE prepare
+$(LIBPERF_UTIL_IN): FORCE prepare $(LIBSYMBOL)
$(Q)$(MAKE) $(build)=perf-util
$(LIBPERF_UTIL): $(LIBPERF_UTIL_IN)
@@ -637,8 +637,7 @@ prepare: $(OUTPUT)PERF-VERSION-FILE \
bpf-skel-prepare \
$(LIBAPI) \
$(LIBPERF) \
- $(LIBSUBCMD) \
- $(LIBSYMBOL)
+ $(LIBSUBCMD)
ifdef LIBBPF_STATIC
prepare: $(LIBBPF)
--
2.54.0.563.g4f69b47b94-goog