All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] perf metrics: Remove the "No_group" metric group
@ 2024-04-03 16:46 Ian Rogers
  2024-04-03 17:59 ` Liang, Kan
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Ian Rogers @ 2024-04-03 16:46 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, linux-perf-users,
	linux-kernel, Andi Kleen

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>
---
 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;
-- 
2.44.0.478.gd926399ef9-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-04-08 14:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-04-08 14:51   ` Arnaldo Carvalho de Melo

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.