Re: [PATCH v2] perf evsel: Improve callchain warning for s390

From: Ian Rogers

Date: Tue Sep 15 2026 - 15:47:46 EST


On Fri, Aug 21, 2026 at 6:03 AM Jens Remus <jremus@xxxxxxxxxxxxx> wrote:
>
> On 8/21/2026 2:55 PM, Jens Remus wrote:
>
> > Instead, warn on s390 when callchain sampling is requested with an event
> > provided by the CPUMSF hardware PMU, because that combination is not
> > supported.
>
> > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
>
> > @@ -1078,9 +1078,8 @@ static void __evsel__config_callchain(struct evsel *evsel, const struct record_o
> > bool function = evsel__is_function_event(evsel);
> > struct perf_event_attr *attr = &evsel->core.attr;
> >
> > - if (EM_HOST == EM_S390 && param->record_mode == CALLCHAIN_FP) {
> > - pr_warning_once(
> > - "Framepointer unwinding lacks kernel support. Use '--call-graph dwarf'\n");
> > + if (EM_HOST == EM_S390 && evsel->pmu && !perf_pmu__is_software(evsel->pmu)) {
> > + pr_warning_once("Cannot use hardware CPUMSF event with -g and --call-graph.\n");
>
> Jan, Thomas, could you please do me a favor and test whether this works
> as expected on LPAR with CPUMSF? Time was running out before I leave on
> vacation.

Thomas, the change looks good to me. What are your thoughts?

Thanks,
Ian

> > }
> >
> > evsel__set_sample_bit(evsel, CALLCHAIN);
> Thanks and regards,
> Jens
> --
> Jens Remus
> Linux on Z Development (D3303)
> jremus@xxxxxxxxxx / jremus@xxxxxxxxxxxxx
>
> IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Ehningen; Registergericht: Amtsgericht Stuttgart, HRB 243294
> IBM Data Privacy Statement: https://www.ibm.com/privacy/
>