mirror-linux/tools/perf
Ian Rogers 2c369d91d0 perf symbol: Add blocking argument to filename__read_build_id
When synthesizing build-ids, for build ID mmap2 events, they will be
added for data mmaps if -d/--data is specified. The files opened for
their build IDs may block on the open causing perf to hang during
synthesis. There is some robustness in existing calls to
filename__read_build_id by checking the file path is to a regular
file, which unfortunately fails for symlinks. Rather than adding more
is_regular_file calls, switch filename__read_build_id to take a
"block" argument and specify O_NONBLOCK when this is false. The
existing is_regular_file checking callers and the event synthesis
callers are made to pass false and thereby avoiding the hang.

Fixes: 53b00ff358 ("perf record: Make --buildid-mmap the default")
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250823000024.724394-3-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-08-25 15:07:18 -07:00
..
Documentation perf record: Make --buildid-mmap the default 2025-07-25 10:37:56 -07:00
arch tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
bench perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
check-header_ignore_hunks/lib
dlfilters
include/perf perf dso: Move build_id to dso_id 2025-07-25 10:37:56 -07:00
jvmti perf: Fix libjvmti.c sign compare error 2025-06-09 22:12:08 -07:00
pmu-events perf jevents: Add common software event json 2025-07-26 16:31:43 -07:00
python perf python: Add counting.py as example for counting perf events 2025-05-22 22:24:58 -03:00
scripts perf flamegraph: Fix minor pylint/type hint issues 2025-07-16 10:43:27 -07:00
tests perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
trace tools headers: Sync uapi/linux/vhost.h with the kernel source 2025-08-18 13:49:26 -07:00
ui perf evlist: Change env variable to session 2025-07-25 10:37:56 -07:00
util perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
.gitignore perf tools: Remove libtraceevent in .gitignore 2025-07-26 15:38:10 -07:00
Build perf build: Specify shellcheck should use bash 2025-06-30 09:43:06 -07:00
CREDITS
MANIFEST perf tools: Fix arm64 source package build 2025-05-13 17:26:35 -03:00
Makefile
Makefile.config tools: Remove libcrypto dependency 2025-06-26 10:51:41 -07:00
Makefile.perf perf build: Always disable stack protection for BPF skeleton objects 2025-07-20 20:49:35 -07:00
builtin-annotate.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-bench.c
builtin-buildid-cache.c perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
builtin-buildid-list.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
builtin-c2c.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-check.c tools: Remove libcrypto dependency 2025-06-26 10:51:41 -07:00
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-evlist.c
builtin-ftrace.c perf: ftrace: add graph tracer options args/retval/retval-hex/retaddr 2025-07-22 17:47:22 -07:00
builtin-help.c
builtin-inject.c perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
builtin-kallsyms.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
builtin-kmem.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-kvm.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-kwork.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-list.c perf list: Skip ABI PMUs when printing pmu values 2025-07-26 16:31:43 -07:00
builtin-lock.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-mem.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-probe.c
builtin-record.c perf auxtrace: Pass perf_env from session through to mmap read 2025-07-25 10:37:58 -07:00
builtin-report.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-sched.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-script.c perf sample: Remove arch notion of sample parsing 2025-07-25 10:37:58 -07:00
builtin-stat.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-timechart.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-top.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-trace.c perf trace: Avoid global perf_env with evsel__env 2025-07-25 10:37:58 -07:00
builtin-version.c perf check: Share the feature status printing routine with 'perf version' 2025-04-10 10:44:04 -03:00
builtin.h perf check: Allow showing a tip for opt-in features not built into perf 2025-04-10 10:44:42 -03:00
check-headers.sh perf tools: Remove excess variable declarations 2025-06-24 11:06:02 -07:00
command-list.txt
design.txt
perf-archive.sh tools/perf: Add --exclude-buildids option to perf archive command 2025-06-26 15:40:19 -07:00
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf env: Remove global perf_env 2025-07-25 10:37:58 -07:00
perf.h