]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf top: Uniform the event name for the hybrid machine
authorKan Liang <kan.liang@linux.intel.com>
Thu, 14 Dec 2023 14:46:12 +0000 (06:46 -0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:43 +0000 (18:19 -0400)
commit1f7b3c801fa826bbb510be38d2219c9ae92205b3
treefb3258a0d894798ab2192d3add617df8ddab3553
parentd361a8ec7b207eb31995427f9e906b85b0d49e1d
perf top: Uniform the event name for the hybrid machine

[ Upstream commit a61f89bf76ef6f87ec48dd90dbc73a6cf9952edc ]

It's hard to distinguish the default cycles events among hybrid PMUs.
For example,

  $ perf top
  Available samples
  385 cycles:P
  903 cycles:P

The other tool, e.g., perf record, uniforms the event name and adds the
hybrid PMU name before opening the event. So the events can be easily
distinguished. Apply the same methodology for the perf top as well.

The evlist__uniquify_name() will be invoked by both record and top.
Move it to util/evlist.c

With the patch:

  $ perf top
  Available samples
  148 cpu_atom/cycles:P/
  1K cpu_core/cycles:P/

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Hector Martin <marcan@marcan.st>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20231214144612.1092028-2-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: 02f9b50e0481 ("perf record: Check conflict between '--timestamp-filename' option and pipe mode before recording")
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/builtin-record.c
tools/perf/builtin-top.c
tools/perf/util/evlist.c
tools/perf/util/evlist.h