Re: [PATCH v6 0/5] perf evsel fallback changes, better s390 defaults
From: Ian Rogers
Date: Wed Mar 18 2026 - 12:42:17 EST
On Wed, Mar 18, 2026 at 1:20 AM Thomas Richter <tmricht@xxxxxxxxxxxxx> wrote:
>
> On 3/17/26 18:56, Ian Rogers wrote:
> > 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.
> >
> > v6: Sashiko noted that target wasn't fully set up when creating the
> > default evlist in `perf top`, so move it earlier. Fix const char*
> > casting issues in __parse_callchain_report_opt. Make '-g' not
> > override the .perfconfig setting again.
> > https://sashiko.dev/#/patchset/20260317055334.760347-1-irogers%40google.com
> >
> > 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
> > https://lore.kernel.org/lkml/20260317055334.760347-1-irogers@xxxxxxxxxx/
> >
> > 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 | 66 +++++++----------------------
> > tools/perf/builtin-top.c | 67 ++++++++++++++++-------------
> > 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 | 73 ++++++++++++++++++++++++++------
> > 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, 217 insertions(+), 155 deletions(-)
> >
>
> Ian, thanks a lot. I tested it using the same sequences as for v5.
>
> Tested-by: Thomas Richter <tmricht@xxxxxxxxxxxxx>
Thanks Thomas! There's a Sashiko review that moving the target
initialization for `perf top` will cause issues, I'll do a v7 with
your tags. That change shouldn't impact any testing.
https://sashiko.dev/#/patchset/20260317175642.161647-1-irogers%40google.com
Thanks,
Ian
> --
> Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
> --
> IBM Deutschland Research & Development GmbH
>
> Vorsitzender des Aufsichtsrats: Wolfgang Wendt
>
> Geschäftsführung: David Faller
>
> Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294