[PATCH v2 13/23] perf metrics: Remove perf_pmu__is_hybrid use
Ian Rogers
irogers at google.com
Sun May 21 23:43:20 PDT 2023
Switch from perf_pmu__is_hybrid to avoid implicitly using the hybrid
PMU list.
Signed-off-by: Ian Rogers <irogers at google.com>
---
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 7de721e9d895..72583f62eda8 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.40.1.698.g37aff9b760-goog
More information about the linux-arm-kernel
mailing list