Re: [PATCH v2 1/2] perf topdown: Use attribute to see an event is a topdown metic or slots

From: Namhyung Kim
Date: Wed Jul 30 2025 - 14:14:12 EST


Hello,

On Tue, Jul 29, 2025 at 11:21:32AM +0800, Mi, Dapeng wrote:
>
> On 7/23/2025 9:03 AM, Namhyung Kim wrote:
> > On Fri, Jul 18, 2025 at 06:27:49AM -0700, Ian Rogers wrote:
> >> The string comparisons were overly broad and could fire for the
> >> incorrect PMU and events. Switch to using the config in the attribute
> >> then add a perf test to confirm the attribute config values match
> >> those of parsed events of that name and don't match others. This
> >> exposed matches for slots events that shouldn't have matched as the
> >> slots fixed counter event, such as topdown.slots_p.
> >>
> >> Fixes: fbc798316bef ("perf x86/topdown: Refine helper arch_is_topdown_metrics()")
> >> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> > Dapeng, are you ok with this (or Ian's TMA fix v3 below)?
> >
> > https://lore.kernel.org/r/20250719030517.1990983-1-irogers@xxxxxxxxxx
>
> Sorry for late response (Just back from vacation). The patches look good to
> me. I tested these patches on Sapphire Rapids and Panther Lake, no issue is
> found. Thanks. 

Thanks for testing this!
Namhyung