[PATCH v5 0/5] perf evsel fallback changes
From: Ian Rogers
Date: Tue Mar 17 2026 - 01:53:59 EST
Discussion with Thomas Richter in:
https://lore.kernel.org/lkml/20260306071002.2526085-1-tmricht@xxxxxxxxxxxxx/
showed that the evsel__fallback wasn't working for s390. These patches
avoid the problematic frame pointer callchain on s390 and fix
evsel__fallback from a range of problems when falling back to a
software event. I simulated failures when developing the patches but
they are untested other than that.
v5: Fix the value for the top option to match that of record. Tidy the
callchain parsing option callbacks. Based on AI review feedback:
https://sashiko.dev/#/patchset/20260317030601.567422-1-irogers%40google.com
v4: Changing the callchain parameter at configuration time means other
options aren't set the same as they would for `--call-graph
dwarf`, for example the stack size. Switch to setting the
callchain option on s390 to parameter parse time. For '-g' use
'--call-graph dwarf' for s390. Other --call-graph options are
parsed as normal, but a warning is generated when setting
`--call-graph fp` for s390. Also fix that sample IDs aren't wanted
when there is only 1 event in the evlist.
https://lore.kernel.org/lkml/20260317030601.567422-1-irogers@xxxxxxxxxx/
v3: Incorporate feedback about event and callchain behavior for s390:
https://lore.kernel.org/lkml/20260312061628.1593105-1-irogers@xxxxxxxxxx/
https://lore.kernel.org/lkml/20260313202811.2599195-1-irogers@xxxxxxxxxx/
v2: try exclude_callchain_user for s390 rather than fully disabling
the callchain. Fix a missed clearing of is_pmu_core if the
software event fallback.
https://lore.kernel.org/lkml/20260312061628.1593105-1-irogers@xxxxxxxxxx/
v1: https://lore.kernel.org/lkml/20260312031928.1494864-1-irogers@xxxxxxxxxx/
Ian Rogers (5):
perf evsel: Improve falling back from cycles
perf target: Constify simple check functions
perf evsel: Constify option arguments to config functions
perf callchain: Refactor callchain option parsing
perf evlist: Improve default event for s390
tools/perf/builtin-record.c | 64 ++++++-----------------------
tools/perf/builtin-top.c | 17 ++++----
tools/perf/builtin-trace.c | 9 +++-
tools/perf/tests/event_update.c | 4 +-
tools/perf/tests/expand-cgroup.c | 4 +-
tools/perf/tests/perf-record.c | 7 +++-
tools/perf/tests/topology.c | 4 +-
tools/perf/util/callchain.c | 39 ++++++++++++++++++
tools/perf/util/callchain.h | 12 ++----
tools/perf/util/evlist.c | 32 ++++++++++-----
tools/perf/util/evlist.h | 2 +-
tools/perf/util/evsel.c | 70 +++++++++++++++++++++-----------
tools/perf/util/evsel.h | 10 +++--
tools/perf/util/target.h | 12 +++---
14 files changed, 165 insertions(+), 121 deletions(-)
--
2.53.0.851.ga537e3e6e9-goog