Re: [PATCH v1 1/3] perf ilist: Don't display deprecated events
From: Howard Chu
Date: Sun Oct 19 2025 - 02:50:56 EST
Hi Namhyung,
On Sat, Oct 18, 2025 at 7:56 PM Namhyung Kim <namhyung@xxxxxxxxxx> 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
>
> Thanks,
> Namhyung
>
> >
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> > ---
> > tools/perf/python/ilist.py | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/perf/python/ilist.py b/tools/perf/python/ilist.py
> > index 9d6465c60df3..69005a88872e 100755
> > --- a/tools/perf/python/ilist.py
> > +++ b/tools/perf/python/ilist.py
> > @@ -439,6 +439,8 @@ class IListApp(App):
> > pmu_node = pmus.add(pmu_name)
> > try:
> > for event in sorted(pmu.events(), key=lambda x: x["name"]):
> > + if "deprecated" in event:
> > + continue
> > if "name" in event:
> > e = event["name"].lower()
> > if "alias" in event:
> > --
> > 2.51.0.858.gf9c4a03a3a-goog
> >