linux-stable/tools/perf
Ian Rogers bae8577ea7 perf stat: Avoid metric-only segv
[ Upstream commit 2543947c77 ]

Cycles is recognized as part of a hard coded metric in stat-shadow.c,
it may call print_metric_only with a NULL fmt string leading to a
segfault. Handle the NULL fmt explicitly.

Fixes: 088519f318 ("perf stat: Move the display functions to stat-display.c")
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Kaige Ye <ye@kaige.org>
Cc: John Garry <john.g.garry@oracle.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240209204947.3873294-4-irogers@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:21:57 -04:00
..
Documentation
arch perf symbol: Remove arch__symbols__fixup_end() 2022-05-09 09:05:09 +02:00
bench parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-14 10:16:51 +01:00
examples/bpf
include/bpf
jvmti
pmu-events perf jevents: Make build dependency on test JSONs 2023-09-23 11:01:08 +02:00
python tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
scripts perf scripts python: exported-sql-viewer.py: Fix warning display 2021-06-03 09:00:28 +02:00
tests perf test uprobe_from_different_cu: Skip if there is no gcc 2023-08-11 11:57:48 +02:00
trace perf beauty: Update copy of linux/socket.h with the kernel sources 2021-06-23 14:42:54 +02:00
ui perf hists browser: Fix the number of entries for 'e' key 2023-09-19 12:20:28 +02:00
util perf stat: Avoid metric-only segv 2024-03-26 18:21:57 -04:00
.gitignore
Build
CREDITS
MANIFEST
Makefile
Makefile.config perf tools: Add an option to build without libbfd 2023-09-23 11:01:08 +02:00
Makefile.perf
builtin-annotate.c
builtin-bench.c perf bench: Add missing setlocale() call to allow usage of %'d style formatting 2023-07-27 08:43:57 +02:00
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c perf c2c: Fix sorting in percent_rmt_hitm_cmp() 2022-06-14 18:32:37 +02:00
builtin-config.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c
builtin-help.c
builtin-inject.c perf inject: Fix itrace space allowed for new attributes 2021-12-17 10:14:41 +01:00
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c perf record: Fix possible incorrect free in record__switch_output() 2024-03-26 18:21:55 -04:00
builtin-report.c perf report: Set PERF_SAMPLE_DATA_SRC bit for Arm SPE event 2022-04-27 13:53:56 +02:00
builtin-sched.c perf sched: Cast PTHREAD_STACK_MIN to int as it may turn into sysconf(__SC_THREAD_STACK_MIN_VALUE) 2023-05-17 11:47:31 +02:00
builtin-script.c perf script: Fix allocation of evsel->priv related to per-event dump files 2023-07-27 08:43:57 +02:00
builtin-stat.c
builtin-timechart.c
builtin-top.c perf top: Don't pass an ERR_PTR() directly to perf_session__delete() 2023-09-19 12:20:25 +02:00
builtin-trace.c perf trace: Handle failure when trace point folder is missed 2023-01-14 10:16:02 +01:00
builtin-version.c
builtin.h
check-headers.sh x86/insn: Add a __ignore_sync_check__ marker 2022-07-25 11:26:11 +02:00
command-list.txt
design.txt
perf-archive.sh
perf-completion.sh perf tools: Fix auto-complete on aarch64 2023-03-11 16:39:40 +01:00
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c perf tools: Fix perf's libperf_print callback 2022-04-13 21:01:07 +02:00
perf.h