2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/tools/perf
James Clark 8988c4b919 perf tools: Fix in-source libperf build
When libperf is built alone in-source, $(OUTPUT) isn't set. This causes
the generated uapi path to resolve to '/../arch' which results in a
permissions error:

  mkdir: cannot create directory '/../arch': Permission denied

Fix it by removing the preceding '/..' which means that it gets
generated either in the tools/lib/perf part of the tree or the OUTPUT
folder. Some other rules that rely on OUTPUT further refine this
conditionally depending on whether it's an in-source or out-of-source
build, but I don't think we need the extra complexity here. And this
rule is slightly different to others because the header is needed by
both libperf and Perf. This is further complicated by the fact that Perf
always passes O=... to libperf even for in source builds, meaning that
OUTPUT isn't set consistently between projects.

Because we're no longer going one level up to try to generate the file
in the tools/ folder, Perf's include rule needs to descend into libperf.
Also fix the clean rule while we're here.

Reported-by: Thorsten Leemhuis <linux@leemhuis.info>
Closes: https://lore.kernel.org/linux-perf-users/7703f88e-ccb7-4c98-9da4-8aad224e780f@leemhuis.info/
Fixes: bfb713ea53 ("perf tools: Fix arm64 build by generating unistd_64.h")
Signed-off-by: James Clark <james.clark@linaro.org>
Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
Link: https://lore.kernel.org/r/20250429-james-perf-fix-libperf-in-source-build-v1-1-a1a827ac15e5@linaro.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-04-29 12:32:31 -07:00
..
arch tools headers: Update the syscall table with the kernel sources 2025-04-10 09:28:24 -07:00
bench perf bench sched pipe: fix enforced blocking reads in worker_thread 2025-03-23 23:20:37 -07:00
check-header_ignore_hunks/lib perf tools: update expected diff for lib/list_sort.c 2024-11-05 17:12:33 -08:00
dlfilters perf tools: Simplify evsel__add_modifier() 2024-10-22 09:52:11 -07:00
Documentation perf script: Update brstack syntax documentation 2025-03-14 10:41:08 -07:00
include/perf
jvmti
pmu-events perf build: Add pylint build tests 2025-03-24 09:38:20 -07:00
python perf python tracepoint.py: Change the COMM using setproctitle if available 2025-03-18 16:08:22 -07:00
scripts perf build: Add pylint build tests 2025-03-24 09:38:20 -07:00
tests tracing/timers: Rename the hrtimer_init event to hrtimer_setup 2025-04-05 10:30:17 +02:00
trace tools headers: Update the linux/unaligned.h copy with the kernel sources 2025-04-10 09:28:25 -07:00
ui perf hist stdio: Do bounds check when printing callchains to avoid UB with new gcc versions 2025-03-13 00:30:14 -07:00
util perf tools: Remove evsel__handle_error_quirks() 2025-04-11 09:22:49 -07:00
.gitignore perf tools: Add the empty-pmu-events build to .gitignore 2024-11-07 10:51:56 -08:00
Build perf build: Add pylint build tests 2025-03-24 09:38:20 -07:00
builtin-annotate.c perf annotate: Add --code-with-type option. 2025-03-13 00:19:51 -07: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 buildid-list: Use perf_tool__init 2024-08-12 18:07:10 -03:00
builtin-c2c.c perf mem: Don't leak mem event names 2025-03-10 14:26:45 -07:00
builtin-check.c perf tools: Remove dependency on libaudit 2025-01-10 10:59:42 -03:00
builtin-config.c perf config: Add a function to set one variable in .perfconfig 2025-01-14 15:05:56 -03:00
builtin-daemon.c perf daemon: Fix the build on more 32-bit architectures 2024-08-19 21:44:30 -03:00
builtin-data.c
builtin-diff.c perf stream: Use evsel rather than evsel->idx 2024-12-23 13:53:08 -03:00
builtin-evlist.c perf evlist: Print hint for group 2024-09-11 13:08:45 -03:00
builtin-ftrace.c perf ftrace latency: allow to hide empty buckets 2025-02-26 13:48:02 -08:00
builtin-help.c perf tools: Remove dependency on libaudit 2025-01-10 10:59:42 -03:00
builtin-inject.c perf inject: Fix use without initialization of local variables 2025-01-14 14:57:19 -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: Add/use accessor for tp_format 2024-12-09 17:52:42 -03:00
builtin-kvm.c perf kvm: Move functions used in util out of builtin 2024-12-18 16:24:32 -03:00
builtin-kwork.c perf kwork: Make perf_kwork_add_work a callback 2024-12-18 16:24:33 -03:00
builtin-list.c perf list: Document -v option deduplication feature 2025-02-26 16:23:47 -08:00
builtin-lock.c perf lock: Report owner stack in usermode 2025-02-28 10:09:02 -08:00
builtin-mem.c perf mem: Don't leak mem event names 2025-03-10 14:26:45 -07:00
builtin-probe.c perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORT 2024-10-18 10:17:40 -07:00
builtin-record.c perf tools: Skip BPF sideband event for userspace profiling 2025-03-02 09:47:24 -08:00
builtin-report.c perf report: Disable children column for data type profiling 2025-03-20 09:17:56 -07:00
builtin-sched.c perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS 2024-12-09 17:52:41 -03:00
builtin-script.c perf script: Fix output type for dynamically allocated core PMU's 2025-03-05 11:46:00 -08:00
builtin-stat.c perf tools: Fix up some comments and code to properly use the event_source bus 2025-02-19 13:23:43 -08:00
builtin-timechart.c perf timechart: Remove redundant variable assignment 2024-11-13 16:27:35 -03:00
builtin-top.c perf annotate: Pass hist_entry to annotate functions 2025-03-13 00:19:51 -07:00
builtin-trace.c perf trace: Fix wrong size to bpf_map__update_elem call 2025-03-24 13:55:26 -07:00
builtin-version.c perf version: Update --build-options to use 'supported_features' array 2024-09-04 16:19:29 -03:00
builtin.h perf script: Move find_scripts to browser/scripts.c 2024-12-18 16:24:32 -03:00
check-headers.sh tools headers: Update the arch/x86/lib/memset_64.S copy with the kernel sources 2025-04-10 09:28:25 -07:00
command-list.txt
CREDITS
design.txt
Makefile perf tools: Fix wrong message when running "make JOBS=1" 2024-08-01 12:11:33 -03:00
Makefile.config perf tools: Fix in-source libperf build 2025-04-29 12:32:31 -07:00
Makefile.perf perf tools changes for v6.15 2025-03-31 08:52:33 -07:00
MANIFEST perf MANIFEST: Add license files 2025-01-14 14:57:19 -03: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: Remove dependency on libaudit 2025-01-10 10:59:42 -03:00
perf.h perf: Increase MAX_NR_CPUS to 4096 2024-12-09 17:52:41 -03:00