Re: [PATCH v1] perf top: Merge hybrid common events

Ian Rogers <[email protected]>
Newsgroups org.kernel.vger.linux-perf-users
Message-ID <CAP-5=fX547ve-LuFXca2QxtRiR7_P8EgnxzPm_pH8N+2xBjZzA@mail.gmail.com>
On Wed, Aug 19, 2026 at 11:25 AM Andi Kleen <[email protected]> wrote:
>
> > So I think we can add a json field to indicate mergeability and set it
> > on legacy instructions, perhaps things like branches and
> > branch-misses
>
> But the current simple check already works fine for them?
>
> >. We can also detect a hybrid system and switch from
> > cycles to instructions as the default event when merging is desired
> > (like in perf top).
>
> instructions rarely gives you an accurate breakdown because
> the IPC varies so much in practice. cycles is a much
> better default.

So maybe sample on cycles for the leader and get instruction counts.
Then we could multiply the period by the rolling average CPI for the
PMU type?

Thanks,
Ian

> The other things are reasonable I guess, but all not really
> needed initially.
>
> -Andi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.