All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v3 7/9] perf config: Add core.hybrid-merge to configure event merging
Date: Wed, 16 Sep 2026 23:57:59 +0000	[thread overview]
Message-ID: <20260916235800.5F22C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260916234652.439778-8-irogers@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] perf: spurious hybrid-merge warning on non-hybrid machines when configured globally
--

commit 8278af13a38e06a26581491ef0fd6844e19d37a9
Author: Ian Rogers <irogers@google.com>

perf config: Add core.hybrid-merge to configure event merging

This commit provides a core.hybrid-merge configuration option in
.perfconfig to enable hybrid event aggregation by default. It allows
users to avoid passing the --hybrid-merge flag on every invocation of
perf report or perf top.

> diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
> index b2972c35c1eca..8fe43b032e9af 100644
> --- a/tools/perf/util/config.c
> +++ b/tools/perf/util/config.c
[ ... ]
> @@ -470,6 +470,16 @@ static int perf_default_core_config(const char *var, const char *value)
>  	if (!strcmp(var, "core.addr2line-disable-warn"))
>  		symbol_conf.addr2line_disable_warn = perf_config_bool(var, value);
>  
> +	if (!strcmp(var, "core.hybrid-merge")) {
> +		/*
> +		 * Note, this is for sampling tools like perf report and top.
> +		 * perf stat has its own merging options and the
> +		 * stat_config.hybrid_merge of "perf stat --hybrid-merge" is
> +		 * deliberately not set here.
> +		 */
> +		symbol_conf.hybrid_merge = perf_config_bool(var, value);
> +	}
> +
>  	/* Add other config variables here. */
>  	return 0;
>  }

[Severity: Medium]
When core.hybrid-merge is set globally to true, will this cause spurious
blocking UI warnings on non-hybrid machines?

In both __cmd_report() and __cmd_top(), there is existing code that evaluates
symbol_conf.hybrid_merge. For example, in __cmd_top():

	if (symbol_conf.hybrid_merge) {
		if (evlist__can_merge_hybrid(top->evlist, /*env=*/NULL)) {
			evlist__merge_hybrid(top->evlist, /*env=*/NULL);
			evlist__merge_hists_hybrid(top->evlist, false);
		} else {
			ui__warning("--hybrid-merge: no events to merge across core PMUs\n");
		}
	}

If symbol_conf.hybrid_merge evaluates to true based on the config default,
running perf top or perf report on a non-hybrid system evaluates
evlist__can_merge_hybrid() as false and triggers this warning. 

Because ui__warning() can create a blocking popup in TUI mode requiring user
dismissal, does this break the usability of the tool on generic systems?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260916234652.439778-1-irogers@google.com?part=7

  reply	other threads:[~2026-09-16 23: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 [this message]
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
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=20260916235800.5F22C1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.