[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240806204813.722372-2-leo.yan@arm.com>
Date: Tue, 6 Aug 2024 21:48:09 +0100
From: Leo Yan <leo.yan@....com>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
James Clark <james.clark@...aro.org>,
linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Leo Yan <leo.yan@....com>
Subject: [PATCH v3 1/5] perf/core: Allow multiple AUX PMU events with the same module
This commit changes the condition from checking the same PMU instance to
checking the same PMU driver module. This allows support for multiple
PMU events with the same driver module.
As a result, more than one AUX event (e.g. arm_spe_0 and arm_spe_1) can
record trace into the AUX ring buffer.
Signed-off-by: Leo Yan <leo.yan@....com>
---
kernel/events/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index aa3450bdc227..fdb8918e62a0 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -12344,9 +12344,10 @@ perf_event_set_output(struct perf_event *event, struct perf_event *output_event)
/*
* If both events generate aux data, they must be on the same PMU
+ * module but can be with different PMU instances.
*/
if (has_aux(event) && has_aux(output_event) &&
- event->pmu != output_event->pmu)
+ event->pmu->module != output_event->pmu->module)
goto out;
/*
--
2.34.1
Powered by blists - more mailing lists