[PATCH v3 35/35] perf pmu: Remove is_pmu_hybrid

Ian Rogers
2023-05-24T22:23:01Z

Users have been removed or switched to using pmu->is_core with
perf_pmus__num_core_pmus() > 1.

Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/util/pmu.c | 7 +------
tools/perf/util/pmu.h | 1 -
2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 4dd40a38f6bf..a548d38f2a07 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -1430,11 +1430,6 @@ bool is_pmu_core(const char *name)
return !strcmp(name, "cpu") || is_sysfs_pmu_core(name);
}

-bool is_pmu_hybrid(const char *name)
-{
- return !strcmp(name, "cpu_atom") || !strcmp(name, "cpu_core");
-}
-
bool perf_pmu__supports_legacy_cache(const struct perf_pmu *pmu)
{
return pmu->is_core;
@@ -1442,7 +1437,7 @@ bool perf_pmu__supports_legacy_cache(const struct perf_pmu *pmu)

bool perf_pmu__auto_merge_stats(const struct perf_pmu *pmu)
{
- return !is_pmu_hybrid(pmu->name);
+ return pmu->is_core && perf_pmus__num_core_pmus() > 1;
}

bool perf_pmu__have_event(const struct perf_pmu *pmu, const char *name)
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 02fec0a7d4c8..287f593b15c7 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -221,7 +221,6 @@ int perf_pmu__format_parse(int dirfd, struct list_head *head);
void perf_pmu__del_formats(struct list_head *formats);

bool is_pmu_core(const char *name);
-bool is_pmu_hybrid(const char *name);
bool perf_pmu__supports_legacy_cache(const struct perf_pmu *pmu);
bool perf_pmu__auto_merge_stats(const struct perf_pmu *pmu);
bool perf_pmu__have_event(const struct perf_pmu *pmu, const char *name);
--
2.40.1.698.g37aff9b760-goog