perf bench bpf: Add missing .gitignore fileIn 713eeb2279402758 ("perf build: Move BPF skeleton generation out ofMakefile.perf") the bpf_skel used with 'perf bench uprobe' was movedfrom tools/perf
perf bench bpf: Add missing .gitignore fileIn 713eeb2279402758 ("perf build: Move BPF skeleton generation out ofMakefile.perf") the bpf_skel used with 'perf bench uprobe' was movedfrom tools/perf/util/bpf_skel/ to tools/perf/bench/bpf_skel.Copy tools/perf/util/bpf_skel/.gitignore to that new directory so thatfiles generated during build get ignored by git.Reported-by: Linus Torvalds <torvalds@linux-foundation.org>Cc: Adrian Hunter <adrian.hunter@intel.com>Cc: Ian Rogers <irogers@google.com>Cc: James Clark <james.clark@linaro.org>Cc: Jiri Olsa <jolsa@kernel.org>Cc: Namhyung Kim <namhyung@kernel.org>Fixes: 713eeb2279402758 ("perf build: Move BPF skeleton generation out of Makefile.perf")Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
perf build: Move BPF skeleton generation out of Makefile.perfCurrently, the top-level Makefile.perf defines a massive global bpf-skelumbrella target that pre-compiles all 12+ BPF skeletons (%.skel
perf build: Move BPF skeleton generation out of Makefile.perfCurrently, the top-level Makefile.perf defines a massive global bpf-skelumbrella target that pre-compiles all 12+ BPF skeletons (%.skel.h) upfrontbefore launching sub-makes. This forces unrelated sub-makes to serializebehind bpftool and clang BPF target evaluations, causing parallel buildbottlenecks.Furthermore, bench_uprobe.bpf.c lived inside util/bpf_skel/, breakingconceptual directory encapsulation since it is consumed purely bybench/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 buildperformance, the impact here is minimal. The main motivation for thechange is to better encapsulate things in the build and simplifyMakefile.perf that has around 50 lines removed.Reviewed-by: Namhyung Kim <namhyung@kernel.org>Assisted-by: Gemini:gemini-3.1-pro-previewSigned-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>