[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fUKJw0uPSjUG1FhY8jJrUOYV+q9zXe-qE=h-0rQ+gXw-w@mail.gmail.com>
Date: Fri, 31 Jan 2025 23:30:55 -0800
From: Ian Rogers <irogers@...gle.com>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>, James Clark <james.clark@...aro.org>,
Ze Gao <zegao2021@...il.com>, Weilin Wang <weilin.wang@...el.com>,
Jean-Philippe Romain <jean-philippe.romain@...s.st.com>, Junhao He <hejunhao3@...wei.com>,
Yicong Yang <yangyicong@...ilicon.com>, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/5] perf pmu: Rename name matching for no suffix or
wildcard variants
On Thu, Jan 30, 2025 at 11:29 AM Liang, Kan <kan.liang@...ux.intel.com> wrote:
> On 2025-01-23 2:46 a.m., Ian Rogers wrote:
[ snip ]
> > /**
> > - * pmu_uncore_alias_match - does name match the PMU name?
> > - * @pmu_name: the json struct pmu_event name. This may lack a suffix (which
> > + * perf_pmu__match_ignoring_suffix_uncore - Does the pmu_name match tok ignoring
> > + * any trailing suffix on pmu_name and
> > + * tok? The Suffix must be in form
> > + * tok_{digits}, or tok{digits}.
> > + * @pmu_name: The pmu_name with possible suffix.
> > + * @tok: The possible match to pmu_name.
> > + */
> > +static bool perf_pmu__match_ignoring_suffix_uncore(const char *pmu_name, const char *tok)
> > +{
> > + size_t pmu_name_len, tok_len;
> > +
>
> if (!pmu_name)
> return false;
>
> I got a segmentfault when I try the code because of a NULL pmu_name.
Thanks for testing! I'll add the extra check. I think it may be
redundant with other event parsing changes that aren't merged in the
main tree.
Ian
Powered by blists - more mailing lists