Skip to content

Commit 3cc8439

Browse files
namhyungacmel
authored andcommitted
perf stat: Honor event config name on --no-merge
If user gave an event name explicitly, it should be displayed in the output as is. But with --no-merge option it adds a pmu name at the end so might confuse users. Actually this is true for hybrid pmus, I think we should do the same for others. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20210602212241.2175005-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 2dc065e commit 3cc8439

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tools/perf/util/stat-display.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ static void uniquify_event_name(struct evsel *counter)
541541
char *config;
542542
int ret = 0;
543543

544-
if (counter->uniquified_name ||
544+
if (counter->uniquified_name || counter->use_config_name ||
545545
!counter->pmu_name || !strncmp(counter->name, counter->pmu_name,
546546
strlen(counter->pmu_name)))
547547
return;
@@ -555,10 +555,8 @@ static void uniquify_event_name(struct evsel *counter)
555555
}
556556
} else {
557557
if (perf_pmu__has_hybrid()) {
558-
if (!counter->use_config_name) {
559-
ret = asprintf(&new_name, "%s/%s/",
560-
counter->pmu_name, counter->name);
561-
}
558+
ret = asprintf(&new_name, "%s/%s/",
559+
counter->pmu_name, counter->name);
562560
} else {
563561
ret = asprintf(&new_name, "%s [%s]",
564562
counter->name, counter->pmu_name);

0 commit comments

Comments
 (0)