Re: [PATCH 1/1] Revert "perf hist: Fix bogus profiles when filters are enabled"

From: Namhyung Kim
Date: Mon Aug 25 2025 - 02:13:52 EST


Hello,

On Wed, Aug 20, 2025 at 06:14:08PM -0700, Dmitry Vyukov wrote:
> On Wed, 20 Aug 2025 at 10:23, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> >
> > This reverts commit 8b4799e4f0f40a4ec737bf870aa38d06288bf0fb.
> >
> > Not combining entries in 'perf top', so we're getting multiple lines for
> > the same symbol, with the same address.
> >
> > To test it, simply run 'perf top', then do /acpi to see just symbols
> > starting with acpi_ and notice that there are various lines with the
> > same symbol, press V to see the address and its the same.
>
> With this revert, does it show 1 entry but with a wrong percent?
> I am not sure why there are 2 entries for the same symbol, but if we
> merge them, we can sum of percents. Is it the right thing to do?

I don't think it'd have a wrong percent. The hists maintain stats for
filtered entries separately.

Based on the position of filtered entries in the RB tree, I think it
might not merge correct samples together and create multiple entries
with the same info.

Filtering by unused sort keys would be undefined. We probably want to
warn users instead.

Thanks,
Namhyung