All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: namhyung@kernel.org, ak@kernel.org, ak@linux.intel.com,
	andi@firstfloor.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v4 0/9] perf report/top: Add opt-in --hybrid-merge
Date: Fri, 18 Sep 2026 18:58:24 -0300	[thread overview]
Message-ID: <aq20APrOz60O4n8B@x2> (raw)
In-Reply-To: <aq2hq_Fw6fn0rGkm@x2>

On Fri, Sep 18, 2026 at 05:40:15PM -0300, Arnaldo Carvalho de Melo wrote:
> On Wed, Sep 16, 2026 at 10:06:59PM -0700, Ian Rogers wrote:
> > On a hybrid machine a wildcard event expands to one event per core
> > PMU, so "perf record -e cycles" records cpu_core/cycles/ and
> > cpu_atom/cycles/. perf report and perf top then show one histogram per
> > PMU, and a symbol that ran on both kinds of core is split across them,
> > with each percentage relative to its own PMU's total. There is no way
> > to ask for the single combined profile.
> > 
> > Add --hybrid-merge to perf report and perf top, which merges the
> > histograms of the events that came from the same wildcard into one,
> > with percentages taken against the summed period.
> > 
> > Merging is opt-in because it isn't always the right thing to do. The
> > cores differ in performance, so a merged cycles count mixes work done
> > at different rates and a merged IPC is not the IPC of either core
> > type. perf-tips notes this. When merging is possible but wasn't asked
> > for, the TUI says so, rather than merging silently.
> > 
> > core.hybrid-merge in .perfconfig turns it on by default. As a default
> > rather than an explicit request it yields to the command line: with
> > --hierarchy it is ignored with a warning, whereas asking for both
> > --hierarchy and --hybrid-merge on the command line is an error. For
> > the same reason it is silent when there is nothing to merge, so it
> > doesn't warn on every invocation on a machine with a single core PMU.
> > 
> > perf stat is deliberately untouched. Counting already has its own
> > merging options, and this is aimed at sampling.
> > 
> > The events to merge are found with first_wildcard_match, which parsing
> > fills in. perf report reads events from a file rather than parsing
> > them, so there the wildcard grouping is recovered by matching event
> > names, and core PMUs are identified from the perf.data header topology
> > so that a file recorded on another machine is read correctly.
> 
> Thanks, applied to perf-tools-next, for v7.4.

I tried 'perf top --hybrid-merge" on this machine:

acme@x2:~/git/perf-tools-next$ grep -m1 "model name" /proc/cpuinfo
model name	: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
acme@x2:~/git/perf-tools-next$

That is hybrid and it didn't merge anything, just told me that:

                       ┌─Warning:──────────────────────────────────────────┐
                       │--hybrid-merge: no events to merge across core PMUs│
                       │                                                   │
                       │                                                   │
                       │Press any key...                                   │
                       └───────────────────────────────────────────────────┘

What am I missing?

I merged this, so we can continue from there,

- Arnaldo


  reply	other threads:[~2026-09-18 21:58 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  6:52 [PATCH v2 0/9] perf report/top: Add opt-in --hybrid-merge Ian Rogers
2026-09-16  6:52 ` [PATCH v2 1/9] perf evlist: Implement evlist__can_merge_hybrid using first_wildcard_match Ian Rogers
2026-09-16  7:02   ` sashiko-bot
2026-09-16  6:52 ` [PATCH v2 2/9] perf ui hist: Add support for aggregated total_period and merging entries Ian Rogers
2026-09-16  7:04   ` sashiko-bot
2026-09-16  6:52 ` [PATCH v2 3/9] perf tools: Expose opt-in --hybrid-merge Ian Rogers
2026-09-16  7:04   ` sashiko-bot
2026-09-16  6:52 ` [PATCH v2 4/9] perf Documentation: Add tip for hybrid event merging Ian Rogers
2026-09-16  6:59   ` sashiko-bot
2026-09-16  6:52 ` [PATCH v2 5/9] perf evlist: Toggle merged_hybrid_group properly in enable/disable Ian Rogers
2026-09-16  7:06   ` sashiko-bot
2026-09-16  6:52 ` [PATCH v2 6/9] perf tools: Add TUI hints for --hybrid-merge Ian Rogers
2026-09-16  7:01   ` sashiko-bot
2026-09-16  6:52 ` [PATCH v2 7/9] perf config: Add core.hybrid-merge to configure event merging Ian Rogers
2026-09-16  6:59   ` sashiko-bot
2026-09-16  6:52 ` [PATCH v2 8/9] perf test: Expand tests for --hybrid-merge Ian Rogers
2026-09-16  7:04   ` sashiko-bot
2026-09-16  6:52 ` [PATCH v2 9/9] perf test: Isolate test suite from user .perfconfig natively Ian Rogers
2026-09-16  7:08   ` sashiko-bot
2026-09-16 23:46 ` [PATCH v3 0/9] perf report/top: Add opt-in --hybrid-merge Ian Rogers
2026-09-16 23:46   ` [PATCH v3 1/9] perf evlist: Implement evlist__can_merge_hybrid using first_wildcard_match Ian Rogers
2026-09-16 23:58     ` sashiko-bot
2026-09-16 23:46   ` [PATCH v3 2/9] perf ui hist: Add support for aggregated total_period and merging entries Ian Rogers
2026-09-16 23:57     ` sashiko-bot
2026-09-16 23:46   ` [PATCH v3 3/9] perf tools: Expose opt-in --hybrid-merge Ian Rogers
2026-09-16 23:57     ` sashiko-bot
2026-09-16 23:46   ` [PATCH v3 4/9] perf Documentation: Add tip for hybrid event merging Ian Rogers
2026-09-16 23:48     ` sashiko-bot
2026-09-16 23:46   ` [PATCH v3 5/9] perf evlist: Toggle merged_hybrid_group properly in enable/disable Ian Rogers
2026-09-16 23:53     ` sashiko-bot
2026-09-16 23:46   ` [PATCH v3 6/9] perf tools: Add TUI hints for --hybrid-merge Ian Rogers
2026-09-16 23:53     ` sashiko-bot
2026-09-16 23:46   ` [PATCH v3 7/9] perf config: Add core.hybrid-merge to configure event merging Ian Rogers
2026-09-16 23:57     ` sashiko-bot
2026-09-16 23:46   ` [PATCH v3 8/9] perf test: Expand tests for --hybrid-merge Ian Rogers
2026-09-16 23:53     ` sashiko-bot
2026-09-16 23:46   ` [PATCH v3 9/9] perf test: Isolate test suite from user .perfconfig natively Ian Rogers
2026-09-16 23:57     ` sashiko-bot
2026-09-17  5:06   ` [PATCH v4 0/9] perf report/top: Add opt-in --hybrid-merge Ian Rogers
2026-09-17  5:07     ` [PATCH v4 1/9] perf evlist: Implement evlist__can_merge_hybrid using first_wildcard_match Ian Rogers
2026-09-17  5:14       ` sashiko-bot
2026-09-17  5:07     ` [PATCH v4 2/9] perf ui hist: Add support for aggregated total_period and merging entries Ian Rogers
2026-09-17  5:16       ` sashiko-bot
2026-09-17  5:07     ` [PATCH v4 3/9] perf tools: Expose opt-in --hybrid-merge Ian Rogers
2026-09-17  5:16       ` sashiko-bot
2026-09-18 20:31       ` Arnaldo Carvalho de Melo
2026-09-18 20:51         ` Ian Rogers
2026-09-17  5:07     ` [PATCH v4 4/9] perf Documentation: Add tip for hybrid event merging Ian Rogers
2026-09-17  5:10       ` sashiko-bot
2026-09-17  5:07     ` [PATCH v4 5/9] perf evlist: Toggle merged_hybrid_group properly in enable/disable Ian Rogers
2026-09-17  5:13       ` sashiko-bot
2026-09-17  5:07     ` [PATCH v4 6/9] perf tools: Add TUI hints for --hybrid-merge Ian Rogers
2026-09-17  5:14       ` sashiko-bot
2026-09-17  5:07     ` [PATCH v4 7/9] perf config: Add core.hybrid-merge to configure event merging Ian Rogers
2026-09-17  5:16       ` sashiko-bot
2026-09-17  5:07     ` [PATCH v4 8/9] perf test: Expand tests for --hybrid-merge Ian Rogers
2026-09-17  5:18       ` sashiko-bot
2026-09-17  5:07     ` [PATCH v4 9/9] perf test: Isolate test suite from user .perfconfig natively Ian Rogers
2026-09-17  5:17       ` sashiko-bot
2026-09-18 20:40     ` [PATCH v4 0/9] perf report/top: Add opt-in --hybrid-merge Arnaldo Carvalho de Melo
2026-09-18 21:58       ` Arnaldo Carvalho de Melo [this message]
2026-09-18 22:07         ` Ian Rogers
2026-09-18 22:11           ` Ian Rogers
2026-09-18 23:04           ` Arnaldo Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aq20APrOz60O4n8B@x2 \
    --to=acme@kernel.org \
    --cc=ak@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=irogers@google.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.