diff mbox series

[4/7] perf evsel: Remove duplicated __evsel__hw_name() code

Message ID 20240813132323.98728-5-james.clark@linaro.org (mailing list archive)
State New, archived
Headers show
Series perf stat: Make default perf stat command work on Arm big.LITTLE | expand

Commit Message

James Clark Aug. 13, 2024, 1:23 p.m. UTC
__evsel__hw_name() does the same thing so use it instead.

Signed-off-by: James Clark <james.clark@linaro.org>
---
 tools/perf/util/evsel.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 19f4d0e71733..ba960a39f104 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -592,12 +592,7 @@  int evsel__hw_name_ext_type_id(struct evsel *evsel, char *bf, size_t size)
 {
 	u64 event = evsel->core.attr.config & PERF_HW_EVENT_MASK;
 	u64 pmu = evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT;
-	const char *event_name;
-
-	if (event < PERF_COUNT_HW_MAX && evsel__hw_names[event])
-		event_name = evsel__hw_names[event];
-	else
-		event_name = "unknown-hardware";
+	const char *event_name = __evsel__hw_name(event);
 
 	/* The PMU type is not required for the non-hybrid platform. */
 	if (!pmu)