Re: [PATCH v2] perf symbol: Remove psw_idle() from list of idle symbols

Arnaldo Carvalho de Melo
2026-03-04T14:34:39Z

On Mon, Mar 02, 2026 at 11:44:19AM -0800, Ian Rogers wrote:
> On Mon, Mar 2, 2026 at 10:43 AM Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> >
> > On Mon, Feb 23, 2026 at 01:46:21PM -0800, Namhyung Kim wrote:
> > > On Thu, Feb 19, 2026 at 12:38:50PM +0100, Thomas Richter wrote:
> > > > Commit fa2ae4a377c0 ("s390/idle: Rewrite psw_idle() in C")
> > > >
> > > > removes symbols psw_idle() and psw_idle_exit() from the linux
> > > > kernel for s390. Remove them in perf tool's list of idle
> > > > functions. They can not be detected anymore.
> > >
> > > But I think old kernels may still run somewhere. It seems the above
> > > commit was merged to v6.10. Maybe we should wait some more time before
> > > removing it in the tool.
> >
> > Agreed, using a new perf tool, say built from the tarballs made
> > available at:
> >
> > https://www.kernel.org/pub/linux/kernel/tools/perf/v7.0.0/perf-7.0.0-rc1.tar.xz
> >
> > (I will not make a rc2 available since there are no changes to the
> > tools/perf codebase in this rc).
> >
> > On older kernels should still ignore those functions.
> >
> > A suggestion for work in this area instead is to get those samples into
> > a special bucket, the "idle" one, and show it at some place in the
> > screen.
>
> Would it also be sensible to pass the perf_env:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/util/env.h?h=perf-tools-next#n74
> into symbol__is_idle? The contents of the perf_env are shown by `perf
> report --header`:
> ```
> # ========
> # captured on : Mon Mar 2 11:34:47 2026
> # header version : 1
> # data offset : 904
> # data size : 4268216
> # feat offset : 4269120
> # hostname : google.com
> # os release : 6.17.13-1rodete1-amd64
> # perf version : 7.0.rc1.g982b63f6380b
> # arch : x86_64
> # nrcpus online : 28
> # nrcpus avail : 28
> # cpudesc : Intel(R) Core(TM) i7-14700
> # cpuid : GenuineIntel,6,183,1
> ...
> # e_machine : 62
> # e_flags : 0
> ...
> ```
> The kernel version is in the release and the e_machine/arch captures
> the CPU type.

Yeah, I think it is a good improvement, I think you mean that we should
have per-arch idle symbol lists?

- Arnaldo