perf metrics: Remove the "No_group" metric group
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. Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20240403164636.3429091-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
0235abd89f
commit
4b5ee6db2d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user