linux-kernelorg-stable/tools/perf/tests
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
..
config-fragments
shell perf test: Ensure lock contention using pipe mode 2025-07-30 13:38:53 -07:00
workloads perf test: Name the noploop process 2025-07-01 15:37:22 -07:00
Build perf test: Add libsubcmd help tests 2025-07-01 15:51:55 -07:00
api-io.c
backward-ring-buffer.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
bitmap.c
bp_account.c perf tests bp_account: Fix leaked file descriptor 2025-07-11 12:05:02 -07:00
bp_signal.c perf parse-events: Add default_breakpoint_len helper 2024-09-04 09:49:09 -03:00
bp_signal_overflow.c perf parse-events: Add default_breakpoint_len helper 2024-09-04 09:49:09 -03:00
builtin-test.c perf test: In forked mode add check that fds aren't leaked 2025-07-02 19:11:13 -07:00
code-reading.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
cpumap.c perf test cpumap: Avoid use-after-free following merge 2025-01-08 17:40:05 -03:00
demangle-java-test.c perf test demangle-java: Don't segv if demangling fails 2025-05-28 10:12:47 -03:00
demangle-ocaml-test.c perf test demangle-ocaml: Switch to using dso__demangle_sym() 2025-05-09 17:03:09 -03:00
demangle-rust-v0-test.c perf test demangle-rust: Add Rust demangling test 2025-05-09 17:01:57 -03:00
dlfilter-test.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
dso-data.c perf test dso-data: Correctly free test file in read test 2025-03-17 22:07:18 -07:00
dwarf-unwind.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
event-times.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
event_groups.c perf test: Update event_groups test to use instructions 2025-01-18 10:32:57 -08:00
event_update.c libperf evsel: Rename own_cpus to pmu_cpus 2025-07-24 13:41:35 -07:00
evsel-roundtrip-name.c
evsel-tp-sched.c perf build: Include libtraceevent headers directly indicated by pkg-config 2024-11-08 22:42:57 -08:00
expand-cgroup.c perf stat: Move metric list from config to evlist 2025-07-11 12:36:40 -07:00
expr.c perf test expr: Fix system_tsc_freq for only x86 2024-12-11 09:19:44 -08:00
fdarray.c
genelf.c
hists_common.c
hists_common.h
hists_cumulate.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hists_filter.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hists_link.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hists_output.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hwmon_pmu.c perf hwmon_pmu: Hold path rather than fd 2025-07-02 19:05:26 -07:00
is_printable_array.c
keep-tracking.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
kmod-path.c
make perf tests make: Add NO_LIBDW=1 to minimal and add standalone test 2025-07-03 11:22:48 -07:00
maps.c
mem.c
mem2node.c
mmap-basic.c perf test: Expand user space event reading (rdpmc) tests 2025-06-20 13:14:07 -07:00
mmap-thread-lookup.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
openat-syscall-all-cpus.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
openat-syscall-tp-fields.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
openat-syscall.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
parse-events.c perf parse-events: Fix missing slots for Intel topdown metric events 2025-07-24 13:41:35 -07:00
parse-metric.c perf stat: Move metric list from config to evlist 2025-07-11 12:36:40 -07:00
parse-no-sample-id-all.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
pe-file-parsing.c perf build-id: Ensure struct build_id is empty before use 2025-07-25 10:37:55 -07:00
pe-file.c
pe-file.exe
pe-file.exe.debug
perf-hooks.c
perf-record.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
perf-targz-src-pkg perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
perf-time-to-tsc.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
pfm.c
pmu-events.c perf jevents: If the long_desc and desc are identical then drop the long_desc 2025-07-11 12:36:40 -07:00
pmu.c perf pmu: Rename name matching for no suffix or wildcard variants 2025-02-04 21:28:46 -08:00
python-use.c
sample-parsing.c perf test: Move PERF_SAMPLE_WEIGHT_STRUCT parsing to common test 2025-07-25 10:37:58 -07:00
sdt.c perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
sigtrap.c perf btf: Make the sigtrap test helper to find a member by name widely available 2024-12-09 17:52:41 -03:00
stat.c perf stat: Move stat_config into config.c 2024-12-18 16:24:32 -03:00
subcmd-help.c perf test: Add libsubcmd help tests 2025-07-01 15:51:55 -07:00
sw-clock.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
switch-tracking.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
symbols.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
task-exit.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
tests-scripts.c perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
tests-scripts.h
tests.h perf test: Add libsubcmd help tests 2025-07-01 15:51:55 -07:00
thread-map.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
thread-maps-share.c
time-utils-test.c
tool_pmu.c perf tests: Fix Tool PMU test segfault 2025-02-12 19:34:56 -08:00
topology.c perf evlist: Change env variable to session 2025-07-25 10:37:56 -07:00
unit_number__scnprintf.c
util.c perf util: add a basic SHA-1 implementation 2025-06-26 10:51:40 -07:00
vmlinux-kallsyms.c perf map: API clean up 2024-08-19 14:49:53 -03:00
wp.c perf test: Make watchpoint data 32-bits on i386 2024-09-03 11:26:53 -03:00