kernel_samsung_a53x/tools/perf
Ian Rogers ab4d8e1224 perf stat: Avoid metric-only segv
[ Upstream commit 2543947c77e0e224bda86b4e7220c2f6714da463 ]

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: 088519f318be ("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-11-19 08:44:53 +01:00
..
arch Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bench Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Documentation Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
examples/bpf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
include/bpf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jvmti Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmu-events Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
python Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scripts Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tests Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ui Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
util perf stat: Avoid metric-only segv 2024-11-19 08:44:53 +01:00
Build Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-annotate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-bench.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-buildid-cache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-buildid-list.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-c2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-config.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-data.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-diff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-evlist.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-ftrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-help.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-inject.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-kallsyms.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-kmem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-kvm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-list.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-lock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-mem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-probe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-record.c perf record: Fix possible incorrect free in record__switch_output() 2024-11-19 08:44:51 +01:00
builtin-report.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-sched.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-script.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-stat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-timechart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-top.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-version.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
check-headers.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
command-list.txt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
CREDITS Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
design.txt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile.config Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile.perf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
MANIFEST Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-archive.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-completion.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-read-vdso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-sys.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-with-kcore.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00