Files
linux/tools/perf/util/kvm-stat-arch/Build
T
Ian Rogers ceea279f93 perf kvm stat: Remove use of the arch directory
`perf kvm stat` supports record and report options.

By using the arch directory a report for a different machine type cannot
be supported.

Move the kvm-stat code out of the arch directory and into
util/kvm-stat-arch following the pattern of perf-regs and dwarf-regs.

Avoid duplicate symbols by renaming functions to have the architecture
name within them.

For global variables, wrap them in an architecture specific function.
Selecting the architecture to use with `perf kvm stat` is selected by
EM_HOST, ie no different than before the change.

Later the ELF machine can be determined from the session or a header
feature (ie EM_HOST at the time of the record).

The build and #define HAVE_KVM_STAT_SUPPORT is now redundant so remove
across Makefiles and in the build.

Opportunistically constify architectural structs and arrays.

Signed-off-by: Ian Rogers <[email protected]>
Cc: Aditya Bodkhe <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Albert Ou <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Alexandre Ghiti <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Andrew Jones <[email protected]>
Cc: Anubhav Shelat <[email protected]>
Cc: Anup Patel <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Blake Jones <[email protected]>
Cc: Chun-Tse Shao <[email protected]>
Cc: Dapeng Mi <[email protected]>
Cc: Dmitriy Vyukov <[email protected]>
Cc: Howard Chu <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: John Garry <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Palmer Dabbelt <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Quan Zhou <[email protected]>
Cc: Shimin Guo <[email protected]>
Cc: Swapnil Sapkal <[email protected]>
Cc: Thomas Falcon <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Yunseong Kim <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2026-02-03 18:01:27 -03:00

7 lines
327 B
Python

perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat-arm64.o
perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat-loongarch.o
perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat-powerpc.o
perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat-riscv.o
perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat-s390.o
perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat-x86.o