linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Ian Rogers <irogers@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH v1] perf metrics: Remove the "No_group" metric group
Date: Fri, 5 Apr 2024 10:45:59 -0400	[thread overview]
Message-ID: <8e60ccd6-907e-445c-85e0-785b1426e98c@linux.intel.com> (raw)
In-Reply-To: <20240403164636.3429091-1-irogers@google.com>



On 2024-04-03 12:46 p.m., Ian Rogers wrote:
> Rather than place metrics without a metric group in "No_group" place
> them in a a metric group that is their name. Still allow such metrics
> to be selected if "No_group" is passed, this change just impacts perf
> list.
> 
> Signed-off-by: Ian Rogers <irogers@google.com>

Reviewed-by: Kan Liang <kan.liang@linux.intel.com>

Thanks,
Kan

> ---
>  tools/perf/util/metricgroup.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index 79ef6095ab28..6ec083af14a1 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -455,7 +455,7 @@ static int metricgroup__add_to_mep_groups(const struct pmu_metric *pm,
>  	const char *g;
>  	char *omg, *mg;
>  
> -	mg = strdup(pm->metric_group ?: "No_group");
> +	mg = strdup(pm->metric_group ?: pm->metric_name);
>  	if (!mg)
>  		return -ENOMEM;
>  	omg = mg;
> @@ -466,7 +466,7 @@ static int metricgroup__add_to_mep_groups(const struct pmu_metric *pm,
>  		if (strlen(g))
>  			me = mep_lookup(groups, g, pm->metric_name);
>  		else
> -			me = mep_lookup(groups, "No_group", pm->metric_name);
> +			me = mep_lookup(groups, pm->metric_name, pm->metric_name);
>  
>  		if (me) {
>  			me->metric_desc = pm->desc;

  parent reply	other threads:[~2024-04-05 14:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 16:46 [PATCH v1] perf metrics: Remove the "No_group" metric group Ian Rogers
2024-04-03 17:59 ` Liang, Kan
2024-04-03 18:31   ` Ian Rogers
2024-04-03 18:57     ` Liang, Kan
2024-04-03 20:26       ` Ian Rogers
2024-04-04 20:29         ` Liang, Kan
2024-04-05  1:16           ` Ian Rogers
2024-04-05 14:44             ` Liang, Kan
2024-04-03 18:44 ` Andi Kleen
2024-04-03 20:23   ` Ian Rogers
2024-04-05 14:45 ` Liang, Kan [this message]
2024-04-08 14:51   ` Arnaldo Carvalho de 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=8e60ccd6-907e-445c-85e0-785b1426e98c@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).