linux/tools/perf/bench
Ian Rogers bac74dcbd4 perf tools: Switch printf("...%s", strerror(errno)) to printf("...%m")
strerror() has thread safety issues, strerror_r() requires stack
allocated buffers.

Code in perf has already been using the "%m" formatting flag that is a
widely support glibc extension to print the current errno's description.

Expand the usage of this formatting flag and remove usage of
strerror()/strerror_r().

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: Blake Jones <blakejones@google.com>
Cc: Chun-Tse Shao <ctshao@google.com>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Dr. David Alan Gilbert <linux@treblig.org>
Cc: Haibo Xu <haibo1.xu@intel.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
Cc: Thomas Falcon <thomas.falcon@intel.com>
Cc: Yunseong Kim <ysk@kzalloc.com>
Cc: Zhongqiu Han <quic_zhonhan@quicinc.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2026-01-14 17:22:50 -03:00
..
bench.h perf bench mem: Add mmap() workloads 2025-09-19 12:43:59 -03:00
breakpoint.c perf bench breakpoint: Skip run if no breakpoints available 2023-08-23 08:39:02 -03:00
Build tools/perf: Allow to select the number of hash buckets 2025-05-03 12:02:10 +02:00
epoll-ctl.c tools/perf: Fix perf bench epoll to enable the run when some CPU's are offline 2024-06-13 21:27:26 -07:00
epoll-wait.c perf bench: Fix undefined behavior in cmpworker() 2025-01-18 10:14:36 -08:00
evlist-open-close.c perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies 2025-11-13 23:03:11 -08:00
find-bit-bench.c x86/asm: Remove code depending on __GCC_ASM_FLAG_OUTPUTS__ 2025-09-08 15:38:06 +02:00
futex-hash.c perf bench futex: Remove support for IMMUTABLE 2025-07-11 16:02:01 +02:00
futex-lock-pi.c perf bench futex: Remove support for IMMUTABLE 2025-07-11 16:02:01 +02:00
futex-requeue.c perf bench futex: Remove support for IMMUTABLE 2025-07-11 16:02:01 +02:00
futex-wake-parallel.c perf bench futex: Remove support for IMMUTABLE 2025-07-11 16:02:01 +02:00
futex-wake.c perf bench futex: Remove support for IMMUTABLE 2025-07-11 16:02:01 +02:00
futex.c perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies 2025-11-13 23:03:11 -08:00
futex.h perf bench futex: Add missing stdbool.h 2025-10-02 15:08:44 -03:00
inject-buildid.c perf tools: Don't read build-ids from non-regular files 2025-11-26 10:13:38 -08:00
kallsyms-parse.c perf bench: Add kallsyms parsing 2020-05-05 16:35:32 -03:00
mem-functions.c perf bench mem: Add mmap() workloads 2025-09-19 12:43:59 -03:00
mem-memcpy-arch.h perf bench mem: Pull out init/fini logic 2025-09-19 12:43:01 -03:00
mem-memcpy-x86-64-asm-def.h perf bench mem: Pull out init/fini logic 2025-09-19 12:43:01 -03:00
mem-memcpy-x86-64-asm.S tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' 2023-05-17 10:42:19 -03:00
mem-memset-arch.h perf bench mem: Pull out init/fini logic 2025-09-19 12:43:01 -03:00
mem-memset-x86-64-asm-def.h perf bench mem: Pull out init/fini logic 2025-09-19 12:43:01 -03:00
mem-memset-x86-64-asm.S tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' 2023-05-17 10:42:19 -03:00
numa.c perf header: Move is_cpu_online to numa bench 2024-11-16 16:36:47 -03:00
pmu-scan.c perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies 2025-11-13 23:03:11 -08:00
sched-messaging.c perf bench messaging: Kill child processes when exit abnormally in process mode 2023-09-26 21:47:12 -07:00
sched-pipe.c perf bench sched pipe: fix enforced blocking reads in worker_thread 2025-03-23 23:20:37 -07:00
sched-seccomp-notify.c perf bench sched-seccomp-notify: Fix spelling mistake "synchronious" -> "synchronous" 2023-12-05 15:48:52 -03:00
synthesize.c perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies 2025-11-13 23:03:11 -08:00
syscall.c perf bench: Fix perf bench syscall loop count 2025-03-05 09:19:23 -08:00
uprobe.c perf tools: Switch printf("...%s", strerror(errno)) to printf("...%m") 2026-01-14 17:22:50 -03:00