From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Howard Chu <howardchu95@gmail.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Gautam Menghani <gautam@linux.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/3] perf ilist: Don't display deprecated events
Date: Mon, 20 Oct 2025 10:10:37 +0900 [thread overview]
Message-ID: <aPWMDVWFUBAjasOl@google.com> (raw)
In-Reply-To: <CAP-5=fWDqE8SYfOLZkg_0=4Ayx6E7O+h7uUp4NDeCFkiN4b7-w@mail.gmail.com>
On Sun, Oct 19, 2025 at 04:04:17PM -0700, Ian Rogers wrote:
> On Sat, Oct 18, 2025 at 11:50 PM Howard Chu <howardchu95@gmail.com> wrote:
> >
> > Hi Namhyung,
> >
> > On Sat, Oct 18, 2025 at 7:56 PM Namhyung Kim <namhyung@kernel.org> wrote:
> > >
> > > Hi Ian,
> > >
> > > On Thu, Oct 16, 2025 at 03:22:26PM -0700, Ian Rogers wrote:
> > > > Unsupported legacy events are flagged as deprecated. Don't display
> > > > these events in ilist as they won't open and there are over 1,000
> > > > legacy cache events.
> > >
> > > Off-topic, any chance to integrate this into a perf command?
> > > It'd be convenient if we can call this like `perf list --interactive`
> > > or some other way.
> >
> > You have my vote, user-friendliness is important.
> > I think Ian mentioned that the major drawback is the difficulty of
> > forwarding arguments passed to the ilist.py program. A random thought:
> > perf is known for binding everything under a single command, but to
> > make scripting more flexible, perhaps some Bash scripts added to
> > .bashrc could be considered. After all, perf is fundamentally a
> > command-line tool.
>
> Thanks Howard and Namhyung,
>
> I think Arnaldo also raised this in the past. My thought on how to do
> this is to build in to `perf script`:
>
> 1) `perf script` currently uses libpython and then exposes a
> trace_start, trace_end and process_event method. When building the
> flamegraph work the only place that textual can run is in trace_end as
> it needs to run on the main python thread. This means we can't do
> incremental loading of data files while textual is showing the data as
> perf wants to be the main thread. So step 1 is to create a python
> version of the trace_start, trace_end and process_event callbacks. To
> do this something like the session API needs wrapping or writing in
> python. I'm not sure I'd keep the API the same as the C one. It'd be
> interesting to think of async file processing. It'd be nice to make
> the generation of strings.. in the event lazier. We could start with
> the existing API though, and then migrate to something more complex
> later.
Sounds like a long term plan. I'm ok with the change but not sure how
soon it would happen. I was suggesting a short term workaround if you
don't plan to work on this. I thought we can exec ilist.py with proper
settings from `perf list`. But it's up to you. :)
Thanks,
Namhyung
>
> 2) Once we have a session like API in python we can convert the
> existing `perf script` commands to be standalone tools similar to
> ilist. So we can convert all the existing tools to be standalone.
>
> 3) Once we have standalone versions of the `perf script` scripts then
> we can have `perf script` just exec the commands. The install step can
> install the scripts like it currently does and we can move ilist into
> the scripts location.
>
> 4) Once we run python things as tools in their own right we can
> deprecate the libpython stuff, probably make it a build opt-in thing,
> etc. It seems hard to delete unused features, like libbfd, from the
> codebase. We did merge a patch deprecating libperl as a step in this
> direction.
>
> Thanks,
> Ian
next prev parent reply other threads:[~2025-10-20 1:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 22:22 [PATCH v1 1/3] perf ilist: Don't display deprecated events Ian Rogers
2025-10-16 22:22 ` [PATCH v1 2/3] perf python: Add PMU argument to parse_metrics Ian Rogers
2025-10-17 14:21 ` Gautam Menghani
2025-10-16 22:22 ` [PATCH v1 3/3] perf ilist: Add PMU information to metrics Ian Rogers
2025-10-19 2:56 ` [PATCH v1 1/3] perf ilist: Don't display deprecated events Namhyung Kim
2025-10-19 6:50 ` Howard Chu
2025-10-19 23:04 ` Ian Rogers
2025-10-20 1:10 ` Namhyung Kim [this message]
2025-10-20 2:12 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aPWMDVWFUBAjasOl@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=gautam@linux.ibm.com \
--cc=howardchu95@gmail.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox