mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 04:37:32 -04:00
Currently, the top-level Makefile.perf defines a massive global bpf-skel umbrella target that pre-compiles all 12+ BPF skeletons (%.skel.h) upfront before launching sub-makes. This forces unrelated sub-makes to serialize behind bpftool and clang BPF target evaluations, causing parallel build bottlenecks. Furthermore, bench_uprobe.bpf.c lived inside util/bpf_skel/, breaking conceptual directory encapsulation since it is consumed purely by bench/uprobe.c. Refactor the BPF skeletons to better achieve directory isolation: 1. Move tools/perf/util/bpf_skel/bench_uprobe.bpf.c directly into tools/perf/bench/bpf_skel/. 2. Extract the skeleton generation infrastructure out of Makefile.perf into a shared inclusion file tools/perf/bpf_skel.mak. 3. Include bpf_skel.mak locally inside tools/perf/util/Build and tools/perf/bench/Build and bind precise local prerequisites. 4. Safely synchronize the shared bpftool bootstrap and vmlinux.h targets via the conditional prepare: umbrella to avoid parallel sub-make races, while evaluating the actual skeletons completely locally on demand. A later patch will move these targets into bpf_skel.mak. 5. Export CLANG from the global Makefile to ensure accurate tool propagation. 6. Clean up Makefile.perf by stripping the global bpf-skel umbrella target and its SKELETONS list. While removing code from Makefile.perf generally helps build performance, the impact here is minimal. The main motivation for the change is to better encapsulate things in the build and simplify Makefile.perf that has around 50 lines removed. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Assisted-by: Gemini:gemini-3.1-pro-preview Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: James Clark <james.clark@linaro.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexandre Chartre <alexandre.chartre@oracle.com> Cc: Alexandre Ghiti <alex@ghiti.fr> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Ankur Arora <ankur.a.arora@oracle.com> Cc: Collin Funk <collin.funk1@gmail.com> Cc: Costa Shulyupin <costa.shul@redhat.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: David Sterba <dsterba@suse.com> Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: Eduard Zingerman <eddyz87@gmail.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Markus Mayer <mmayer@broadcom.com> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Terrell <terrelln@fb.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <pjw@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Monnet <qmo@kernel.org> Cc: Ricky Ringler <ricky.ringler@proton.me> Cc: Song Liu <song@kernel.org> Cc: Swapnil Sapkal <swapnil.sapkal@amd.com> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Tomas Glozar <tglozar@redhat.com> Cc: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
33 lines
935 B
Plaintext
33 lines
935 B
Plaintext
perf-bench-y += sched-messaging.o
|
|
perf-bench-y += sched-pipe.o
|
|
perf-bench-y += sched-seccomp-notify.o
|
|
perf-bench-y += syscall.o
|
|
perf-bench-y += mem-functions.o
|
|
perf-bench-y += futex.o
|
|
perf-bench-y += futex-hash.o
|
|
perf-bench-y += futex-wake.o
|
|
perf-bench-y += futex-wake-parallel.o
|
|
perf-bench-y += futex-requeue.o
|
|
perf-bench-y += futex-lock-pi.o
|
|
perf-bench-y += epoll-wait.o
|
|
perf-bench-y += epoll-ctl.o
|
|
perf-bench-y += synthesize.o
|
|
perf-bench-y += kallsyms-parse.o
|
|
perf-bench-y += find-bit-bench.o
|
|
perf-bench-y += inject-buildid.o
|
|
perf-bench-y += evlist-open-close.o
|
|
perf-bench-y += breakpoint.o
|
|
perf-bench-y += pmu-scan.o
|
|
perf-bench-y += uprobe.o
|
|
|
|
perf-bench-$(CONFIG_X86_64) += mem-memcpy-x86-64-asm.o
|
|
perf-bench-$(CONFIG_X86_64) += mem-memset-x86-64-asm.o
|
|
|
|
perf-bench-$(CONFIG_NUMA) += numa.o
|
|
|
|
ifeq ($(CONFIG_PERF_BPF_SKEL),y)
|
|
include $(srctree)/tools/perf/bpf_skel.mak
|
|
|
|
$(OUTPUT)bench/uprobe.o: $(SKEL_OUT)/bench_uprobe.skel.h
|
|
endif
|