All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf pmu: Consider raw events as legacy events
@ 2025-05-06 22:23 Namhyung Kim
  2025-05-07 15:42 ` Ian Rogers
  0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2025-05-06 22:23 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ian Rogers, Kan Liang
  Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users

When it finds a matching pmu for a legacy event, it should look for
core pmus.  The raw events also refers to core events so it should be
handled together.

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

diff --git a/tools/perf/util/pmus.c b/tools/perf/util/pmus.c
index b99292de76693dbb..0134321fc520b1fc 100644
--- a/tools/perf/util/pmus.c
+++ b/tools/perf/util/pmus.c
@@ -726,7 +726,8 @@ struct perf_pmu *evsel__find_pmu(const struct evsel *evsel)
 	pmu = perf_pmus__find_by_type(evsel->core.attr.type);
 	legacy_core_type =
 		evsel->core.attr.type == PERF_TYPE_HARDWARE ||
-		evsel->core.attr.type == PERF_TYPE_HW_CACHE;
+		evsel->core.attr.type == PERF_TYPE_HW_CACHE ||
+		evsel->core.attr.type == PERF_TYPE_RAW;
 	if (!pmu && legacy_core_type) {
 		if (perf_pmus__supports_extended_type()) {
 			u32 type = evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT;
-- 
2.49.0.987.g0cc8ee98dc-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-07 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-06 22:23 [PATCH] perf pmu: Consider raw events as legacy events Namhyung Kim
2025-05-07 15:42 ` Ian Rogers
2025-05-07 21:50   ` Namhyung Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.