]> git.baikalelectronics.ru Git - kernel.git/commit
perf evsel: Add arch_evsel__hw_name()
authorKan Liang <kan.liang@linux.intel.com>
Thu, 21 Jul 2022 06:57:03 +0000 (14:57 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 29 Jul 2022 16:41:19 +0000 (13:41 -0300)
commita76db3b6fb9a1df9c8e6144eaba16b8feb90e9c0
tree50a38300610462658e224d7514d97702fb546718
parent40d379c806311f2f8feb2bd6e69e5907c4899b6a
perf evsel: Add arch_evsel__hw_name()

The commit 330af8e7e3a692e3 ("perf: Extend PERF_TYPE_HARDWARE and
PERF_TYPE_HW_CACHE") extends the two types to become PMU aware types for
a hybrid system. However, current evsel__hw_name doesn't take the PMU
type into account. It mistakenly returns the "unknown-hardware" for the
hardware event with a specific PMU type.

Add an arch specific arch_evsel__hw_name() to specially handle the PMU
aware hardware event.

Currently, the extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE is only
supported by X86. Only implement the specific arch_evsel__hw_name() for
X86 in the patch.

Nothing is changed for the other archs.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220721065706.2886112-3-zhengjun.xing@linux.intel.com
Signed-off-by: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/evsel.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h