[PATCH v3 0/6] perf kvm: A small update in the default arch event
From: Namhyung Kim
Date: Wed Jul 01 2026 - 15:47:52 EST
Hello,
Ian said there's an issue in the perf kvm record command line option parsing.
This is my attempt to address the issue, simplify the code and fix memory leaks.
v3 changes)
* remove unnecessary error check (Sashiko)
* update test code after rebase
v2 changes)
* handle kvm top subcommand (Sashiko)
* handle other arch/condition for the default events (Sashiko)
* add <stdlib.h> for musl compatibility (Sashiko)
* fix some memory leaks
Thanks,
Namhyung
Namhyung Kim (6):
perf kvm: Factor out kvm_need_default_arch_event()
perf kvm: Check kvm_need_default_arch_event() early
perf kvm: Kill STRDUP_FAIL_EXIT()
perf kvm: Do not copy filename string
perf kvm: Fix a memory leak in the usage string
perf test: Extend perf kvm tests to check default event
tools/perf/builtin-kvm.c | 109 ++++++++----------
tools/perf/tests/shell/kvm.sh | 10 ++
.../util/kvm-stat-arch/kvm-stat-powerpc.c | 31 +----
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c | 37 +-----
tools/perf/util/kvm-stat.c | 41 +++++++
tools/perf/util/kvm-stat.h | 18 ++-
6 files changed, 116 insertions(+), 130 deletions(-)
--
2.55.0.rc0.799.gd6f94ed593-goog