[PATCH v4 22/35] perf metrics: Remove perf_pmu__is_hybrid use
From: Ian Rogers
Date: Fri May 26 2023 - 17:56:21 EST
Switch from perf_pmu__is_hybrid to avoid implicitly using the hybrid
PMU list.
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
Reviewed-by: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
---
tools/perf/util/metricgroup.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 80ffd6da70c7..3f04a686d1cd 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -11,7 +11,6 @@
#include "evsel.h"
#include "strbuf.h"
#include "pmu.h"
-#include "pmu-hybrid.h"
#include "print-events.h"
#include "smt.h"
#include "expr.h"
@@ -274,7 +273,7 @@ static int setup_metric_events(const char *pmu, struct hashmap *ids,
const char *metric_id;
struct evsel *ev;
size_t ids_size, matched_events, i;
- bool all_pmus = !strcmp(pmu, "all") || !perf_pmu__is_hybrid(pmu);
+ bool all_pmus = !strcmp(pmu, "all") || !perf_pmu__has_hybrid() || !is_pmu_hybrid(pmu);
*out_metric_events = NULL;
ids_size = hashmap__size(ids);
@@ -288,8 +287,7 @@ static int setup_metric_events(const char *pmu, struct hashmap *ids,
struct expr_id_data *val_ptr;
/* Don't match events for the wrong hybrid PMU. */
- if (!all_pmus && ev->pmu_name &&
- perf_pmu__is_hybrid(ev->pmu_name) &&
+ if (!all_pmus && ev->pmu_name && evsel__is_hybrid(ev) &&
strcmp(ev->pmu_name, pmu))
continue;
/*
--
2.41.0.rc0.172.g3f132b7071-goog