lkml.org 
[lkml]   [2023]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH v1 11/23] perf evsel: Compute is_hybrid from PMU being core
From
Short-cut when has_hybrid is false, otherwise return if the evsel's
PMU is core.

Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/util/evsel.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index b39615124672..2c0ed7d25466 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -46,8 +46,8 @@
#include "memswap.h"
#include "util.h"
#include "util/hashmap.h"
-#include "pmu-hybrid.h"
#include "off_cpu.h"
+#include "pmu.h"
#include "../perf-sys.h"
#include "util/parse-branch-options.h"
#include "util/bpf-filter.h"
@@ -3133,7 +3133,13 @@ void evsel__zero_per_pkg(struct evsel *evsel)

bool evsel__is_hybrid(const struct evsel *evsel)
{
- return evsel->pmu_name && perf_pmu__is_hybrid(evsel->pmu_name);
+ struct perf_pmu *pmu;
+
+ if (!perf_pmu__has_hybrid())
+ return false;
+
+ pmu = evsel__find_pmu(evsel);
+ return pmu->is_core;
}

struct evsel *evsel__leader(const struct evsel *evsel)
--
2.40.1.606.ga4b1b128d6-goog
\
 
 \ /
  Last update: 2023-05-17 17:01    [W:1.562 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site