Re: [PATCH] perf pmus: Fix duplicate events caused segfault
From: Arnaldo Carvalho de Melo
Date: Mon Aug 05 2024 - 16:18:42 EST
On Mon, Aug 05, 2024 at 12:48:23PM -0700, Ian Rogers wrote:
> On Mon, Aug 5, 2024 at 10:02 AM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> > On Mon, Aug 5, 2024 at 7:24 AM Athira Rajeev <atrajeev@xxxxxxxxxxxxxxxxxx> wrote:
> > > > On 4 Aug 2024, at 8:36 PM, Eric Lin <eric.lin@xxxxxxxxxx> wrote:
> > > > On Sun, Jul 21, 2024 at 11:44 PM Eric Lin <eric.lin@xxxxxxxxxx> wrote:
> > > > Kindly ping.
> > > > Can I ask, are there any more comments about this patch? Thanks.
> > > The functions there says alias and to skip duplicate alias. I am not sure if that is for events
> > Fwiw, I'm trying to get rid of the term alias it should mean event.
> > For some reason the code always referred to events as aliases as
> > exemplified by:
> > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/util/pmu.c?h=tmp.perf-tools-next#n55
> > But it is possible to have an "alias" (different) name for a PMU and
> > I'm sure for other things too. So the term alias is ambiguous and
> > these things are events, so let's just call them events to be most
> > intention revealing.
> > > Namhyung, Ian, Arnaldo
> > > Any comments here ?
> > I'll take a look.
>
> The problematic events all come from copy pasting ArchStdEvent. It
> feels better to have an invariant that events appear once so I sent
> out a series to clean this up:
> https://lore.kernel.org/linux-perf-users/20240805194424.597244-1-irogers@xxxxxxxxxx/
> If you could test and add a tested-by tag that'd be great!
I have the series in tmp.perf-tools-next, will collect
Tested-by/Reviewed-by if they are provided, before moving it to
perf-tools-next.
- Arnaldo