[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230524221831.1741381-23-irogers@google.com>
Date: Wed, 24 May 2023 15:18:18 -0700
From: Ian Rogers <irogers@...gle.com>
To: Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
Leo Yan <leo.yan@...aro.org>,
John Garry <john.g.garry@...cle.com>,
Will Deacon <will@...nel.org>,
James Clark <james.clark@....com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Kajol Jain <kjain@...ux.ibm.com>,
Jing Zhang <renyu.zj@...ux.alibaba.com>,
Kan Liang <kan.liang@...ux.intel.com>,
Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
Ravi Bangoria <ravi.bangoria@....com>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
Ming Wang <wangming01@...ngson.cn>,
Huacai Chen <chenhuacai@...nel.org>,
Sandipan Das <sandipan.das@....com>,
Dmitrii Dolgov <9erthalion6@...il.com>,
Sean Christopherson <seanjc@...gle.com>,
Ali Saidi <alisaidi@...zon.com>, Rob Herring <robh@...nel.org>,
Thomas Richter <tmricht@...ux.ibm.com>,
Kang Minchul <tegongkang@...il.com>,
linux-kernel@...r.kernel.org, coresight@...ts.linaro.org,
linux-arm-kernel@...ts.infradead.org,
linux-perf-users@...r.kernel.org
Subject: [PATCH v3 22/35] perf metrics: Remove perf_pmu__is_hybrid use
Switch from perf_pmu__is_hybrid to avoid implicitly using the hybrid
PMU list.
Signed-off-by: Ian Rogers <irogers@...gle.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
Powered by blists - more mailing lists