linux/tools/perf
Namhyung Kim ca9680821d perf bpf: Fix handling of minimal vmlinux.h file when interrupting the build
Ingo reported that he was seeing these when hitting Control+C during a
perf tools build:

  Makefile.perf:1149: *** Missing bpftool input for generating vmlinux.h. Stop.

The failure happens when you don't have vmlinux.h or vmlinux with BTF.

ifeq ($(VMLINUX_H),)
  ifeq ($(VMLINUX_BTF),)
    $(error Missing bpftool input for generating vmlinux.h)
  endif
endif

VMLINUX_BTF can be empty if you didn't build a kernel or it doesn't have
a BTF section and the current kernel also has no BTF.  This is totally
ok.

But VMLINUX_H should be set to the minimal version in the source tree
(unless you overwrite it manually) when you don't pass GEN_VMLINUX_H=1
(which requires VMLINUX_BTF should not be empty).  The problem is that
it's defined in Makefile.config which is not included for `make clean`.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Link: http://lore.kernel.org/lkml/CAM9d7ch5HTr+k+_GpbMrX0HUo5BZ11byh1xq0Two7B7RQACuNw@mail.gmail.com
Link: http://lore.kernel.org/lkml/ZjssGrj+abyC6mYP@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-06-05 11:33:00 -03:00
..
arch tools headers: Update the syscall tables and unistd.h, mostly to support the new 'mseal' syscall 2024-05-28 11:10:00 -03:00
bench perf bench internals inject-build-id: Fix trap divide when collecting just one DSO 2024-05-07 12:44:02 -03:00
dlfilters
Documentation perf sched: Rename 'switches' column header to 'count' and add usage description, options for latency 2024-05-10 11:10:03 -03:00
include/perf
jvmti
pmu-events perf vendor events amd: Add Zen 5 mapping 2024-05-04 15:10:07 -03:00
python
scripts perf scripts python: Add a script to run instances of 'perf script' in parallel 2024-04-26 22:07:19 -03:00
tests perf parse: Allow tracepoint names to start with digits 2024-05-10 10:50:34 -03:00
trace perf trace beauty: Update the arch/x86/include/asm/irq_vectors.h copy with the kernel sources to pick POSTED_MSI_NOTIFICATION 2024-05-27 13:42:18 -03:00
ui perf ui browser: Avoid SEGV on title 2024-05-09 18:12:47 -03:00
util Revert "perf parse-events: Prefer sysfs/JSON hardware events over legacy" 2024-05-26 08:41:34 -03:00
.gitignore perf build: Shellcheck support for OUTPUT directory 2023-12-05 15:46:43 -03:00
Build perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
builtin-annotate.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-bench.c perf bench uprobe: Add uretprobe variant of uprobe benchmarks 2024-04-12 17:54:02 -03:00
builtin-buildid-cache.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-buildid-list.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-c2c.c perf mem-info: Add reference count checking 2024-05-07 18:06:44 -03:00
builtin-config.c
builtin-daemon.c perf daemon: Fix file leak in daemon_session__control 2024-05-10 11:28:11 -03:00
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c libperf cpumap: Replace usage of perf_cpu_map__new(NULL) with perf_cpu_map__new_online_cpus() 2023-12-12 14:55:13 -03:00
builtin-help.c
builtin-inject.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-kallsyms.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-kmem.c perf evsel: Use evsel__name_is() helper 2024-04-03 11:48:56 -03:00
builtin-kvm.c
builtin-kwork.c perf kwork: Use zfree() to avoid possibly accessing dangling pointers 2024-05-07 12:44:02 -03:00
builtin-list.c perf list: Escape '\r' in JSON output 2024-04-12 17:54:02 -03:00
builtin-lock.c perf lock: Avoid memory leaks from strdup() 2024-05-10 11:15:13 -03:00
builtin-mem.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-probe.c perf probe: Use zfree() to avoid possibly accessing dangling pointers 2024-05-07 12:44:02 -03:00
builtin-record.c Revert "perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event" 2024-06-05 11:12:36 -03:00
builtin-report.c perf report: Avoid SEGV in report__setup_sample_type() 2024-05-09 18:14:39 -03:00
builtin-sched.c perf sched: Rename 'switches' column header to 'count' and add usage description, options for latency 2024-05-10 11:10:03 -03:00
builtin-script.c perf mem-info: Add reference count checking 2024-05-07 18:06:44 -03:00
builtin-stat.c perf cpumap: Remove refcnt from 'struct cpu_aggr_map' 2024-05-07 18:06:44 -03:00
builtin-timechart.c
builtin-top.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-trace.c tools headers UAPI: Sync fcntl.h with the kernel sources to pick F_DUPFD_QUERY 2024-05-27 12:44:09 -03:00
builtin-version.c perf version: Display availability of OpenCSD support 2024-03-03 22:48:40 -08:00
builtin.h perf tools: Suggest inbuilt commands for unknown command 2024-03-21 13:54:40 -03:00
check-headers.sh tools headers: Synchronize linux/bits.h with the kernel sources 2024-04-26 22:13:10 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf build: Pretend scandirat is missing with msan 2024-04-26 22:13:10 -03:00
Makefile.perf perf bpf: Fix handling of minimal vmlinux.h file when interrupting the build 2024-06-05 11:33:00 -03:00
MANIFEST tools perf: Add arm64 sysreg files to MANIFEST 2023-11-22 11:17:53 -08:00
perf-archive.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-completion.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf tools: Suggest inbuilt commands for unknown command 2024-03-21 13:54:40 -03:00
perf.h