[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240806211439.GB37996@noisy.programming.kicks-ass.net>
Date: Tue, 6 Aug 2024 23:14:39 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Leo Yan <leo.yan@....com>
Cc: 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
Subject: Re: [PATCH v3 1/5] perf/core: Allow multiple AUX PMU events with the
same module
On Tue, Aug 06, 2024 at 09:48:09PM +0100, Leo Yan wrote:
> 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)
A very quick look at: arch/x86/events/intel/pt.c seems to suggest that
doesn't set pmu->module. Which seems to suggest the above won't work for
us.
Powered by blists - more mailing lists