lkml.org 
[lkml]   [2022]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/19] perf tools: Use pmu info in evsel__is_hybrid()
Date
If evsel has pmu, it can use pmu->is_hybrid directly.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/evsel.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 196f8e4859d7..a6ea91c72659 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -3132,6 +3132,9 @@ void evsel__zero_per_pkg(struct evsel *evsel)

bool evsel__is_hybrid(struct evsel *evsel)
{
+ if (evsel->pmu)
+ return evsel->pmu->is_hybrid;
+
return evsel->pmu_name && perf_pmu__is_hybrid(evsel->pmu_name);
}

--
2.38.0.rc1.362.ged0d419d3c-goog
\
 
 \ /
  Last update: 2022-10-10 07:37    [W:0.031 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site