From nobody Sat Feb 7 11:38:03 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C60619147D; Fri, 9 Aug 2024 12:14:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205702; cv=none; b=f2RfdfQWX2owYRdn/TsSe40gC7L5VTXp/tqZRXO6NtrvkXFOQ99ZGH9Lh0MvAnn9AV2FHirkYe30ZyqAvQwIKw+ZnyXJqcQOg2/sR66m7EeDpJGc6SULtF+bbJST+Vagimp1v9BWymWIV5BGrqbELSZuPqWZLfGE25PNNy7T8dc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205702; c=relaxed/simple; bh=dmvGzamLflE7hsQ0NvVBFble5SoWp76e5mNhJG5gMPs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AYeSLiD32M7G/K7mczHyurpNR6S0rA4YfXS4ZNDR2e+KVtbxAw4h25T1PjNCqfplOyuM1FTUov/ZcS+1be/TfdunA1LhbbcFxI3X6ySPCcMziesLo2GXuW6pLXgvB4gxkByJijhUpujLUqUeJSDBRzMZIdvkxQC/Oz8ytrVEVvc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56DEE1684; Fri, 9 Aug 2024 05:15:25 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B72D93F6A8; Fri, 9 Aug 2024 05:14:57 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , Suzuki K Poulose , Mike Leach , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v4 1/8] perf/core: Allow multiple AUX PMU events with the same module Date: Fri, 9 Aug 2024 13:14:40 +0100 Message-Id: <20240809121447.2078084-2-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240809121447.2078084-1-leo.yan@arm.com> References: <20240809121447.2078084-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This commit changes the condition from checking the same PMU instance to checking the same .setup_aux() callback pointer. If PMU events have the same callback pointer, it means they share 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 --- kernel/events/core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index aa3450bdc227..f450e6a91b1a 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -12344,9 +12344,16 @@ perf_event_set_output(struct perf_event *event, st= ruct perf_event *output_event) =20 /* * If both events generate aux data, they must be on the same PMU + * module but can be with different PMU instances. + * + * For a built-in PMU module, the 'pmu->module' pointer is NULL, + * thus it is not feasible to compare the module pointers when + * AUX PMU drivers are built into the kernel image. Instead, + * comparing the .setup_aux() callback pointer can determine if + * the two PMU events come from the same PMU driver. */ if (has_aux(event) && has_aux(output_event) && - event->pmu !=3D output_event->pmu) + event->pmu->setup_aux !=3D output_event->pmu->setup_aux) goto out; =20 /* --=20 2.34.1 From nobody Sat Feb 7 11:38:03 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A920194136; Fri, 9 Aug 2024 12:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205704; cv=none; b=QpvbOuU2pdSdAw1ltIRV1LPWLjSnYF+d2V6pAaCAaCWsH0tsj+H1Xwy9aIti7L90ZM/fPQszW+fSZcu7rhNaXiKa0YrtJuyE/qVj5b7LqQ7qWne0F9VPYJ7IIlS4RewK65PSuNWFFjoVEThxnUHsRNvyrhmHjHVwxJbzPvQrGeQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205704; c=relaxed/simple; bh=m6d5jmjhQ+tN9cJsLCW5oWcfmoz1ZK5x4hk3sT5vyqI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Llrz7KJmoZF2Z9KavNJCiPkirZGVO+drtX+6wNmo7I5/RcbVYU7K3bR1gEXROjw0DKC5J64gOROfmhp4B86R6VNqEy8BFJHI2PqQ+BaTOMn/5ZTvGj8cm7D2d98XVslfcTpjk1h86xwoHhpkxYnaD9Sx4hjFZwMxbl/m0AjqVKE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6527E1688; Fri, 9 Aug 2024 05:15:27 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BBAFA3F6A8; Fri, 9 Aug 2024 05:14:59 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , Suzuki K Poulose , Mike Leach , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v4 2/8] perf auxtrace: Use evsel__is_aux_event() for checking AUX event Date: Fri, 9 Aug 2024 13:14:41 +0100 Message-Id: <20240809121447.2078084-3-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240809121447.2078084-1-leo.yan@arm.com> References: <20240809121447.2078084-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use evsel__is_aux_event() to decide if an event is a AUX event, this is a refactoring to replace comparing the PMU type. Signed-off-by: Leo Yan Reviewed-by: Adrian Hunter --- tools/perf/util/auxtrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index e2f317063eec..c3f0ef4349fc 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -671,11 +671,11 @@ int auxtrace_record__read_finish(struct auxtrace_reco= rd *itr, int idx) { struct evsel *evsel; =20 - if (!itr->evlist || !itr->pmu) + if (!itr->evlist) return -EINVAL; =20 evlist__for_each_entry(itr->evlist, evsel) { - if (evsel->core.attr.type =3D=3D itr->pmu->type) { + if (evsel__is_aux_event(evsel)) { if (evsel->disabled) return 0; return evlist__enable_event_idx(itr->evlist, evsel, idx); --=20 2.34.1 From nobody Sat Feb 7 11:38:03 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47E75194A43; Fri, 9 Aug 2024 12:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205705; cv=none; b=Bz0KYsy0b/YHG1P85GetqRYlhygll8JujdYXysi7+v0Ye7ZFt2kqGsNNqkzqletqDx+mRGByU7vsAxuL9m7kO6/q9prz2YsHeNtGtspSl5VnqeMMIUZSXZUA4HRoFIHFX7gpixi3+AgIxAfVvVZvOvJnljtAZ7sdCndn0oDtLuw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205705; c=relaxed/simple; bh=dWuicMgFKxKDdAUHfAKkT6MijuuiuAguDeUPrOmffkg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gnMb9EKZxtF87tia18Io95/ruL7RAJq1hR/Z5282oQ01WaezPCGMRdbxcxWo+XIyz6hgpQfvXST16AaGZ7iX+HMs4fvwX/1BNr3Z+2vTQQLqua7SuH1L+SnLJRNxWCg8zpMf0AwIQhGSqhWp1yl1areHXDRXPan1aDgCufe/qaU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6A5BC168F; Fri, 9 Aug 2024 05:15:29 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C9D2F3F6A8; Fri, 9 Aug 2024 05:15:01 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , Suzuki K Poulose , Mike Leach , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v4 3/8] perf auxtrace: Remove unused 'pmu' pointer from struct auxtrace_record Date: Fri, 9 Aug 2024 13:14:42 +0100 Message-Id: <20240809121447.2078084-4-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240809121447.2078084-1-leo.yan@arm.com> References: <20240809121447.2078084-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The 'pmu' pointer in the auxtrace_record structure is not used after support multiple AUX events, remove it. Signed-off-by: Leo Yan Reviewed-by: Adrian Hunter --- tools/perf/arch/arm/util/cs-etm.c | 1 - tools/perf/arch/arm64/util/arm-spe.c | 1 - tools/perf/arch/arm64/util/hisi-ptt.c | 1 - tools/perf/arch/x86/util/intel-bts.c | 1 - tools/perf/arch/x86/util/intel-pt.c | 1 - tools/perf/util/auxtrace.h | 1 - 6 files changed, 6 deletions(-) diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/c= s-etm.c index da6231367993..96aeb7cdbee1 100644 --- a/tools/perf/arch/arm/util/cs-etm.c +++ b/tools/perf/arch/arm/util/cs-etm.c @@ -888,7 +888,6 @@ struct auxtrace_record *cs_etm_record_init(int *err) } =20 ptr->cs_etm_pmu =3D cs_etm_pmu; - ptr->itr.pmu =3D cs_etm_pmu; ptr->itr.parse_snapshot_options =3D cs_etm_parse_snapshot_options; ptr->itr.recording_options =3D cs_etm_recording_options; ptr->itr.info_priv_size =3D cs_etm_info_priv_size; diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/u= til/arm-spe.c index d59f6ca499f2..2be99fdf997d 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -514,7 +514,6 @@ struct auxtrace_record *arm_spe_recording_init(int *err, } =20 sper->arm_spe_pmu =3D arm_spe_pmu; - sper->itr.pmu =3D arm_spe_pmu; sper->itr.snapshot_start =3D arm_spe_snapshot_start; sper->itr.snapshot_finish =3D arm_spe_snapshot_finish; sper->itr.find_snapshot =3D arm_spe_find_snapshot; diff --git a/tools/perf/arch/arm64/util/hisi-ptt.c b/tools/perf/arch/arm64/= util/hisi-ptt.c index ba97c8a562a0..eac9739c87e6 100644 --- a/tools/perf/arch/arm64/util/hisi-ptt.c +++ b/tools/perf/arch/arm64/util/hisi-ptt.c @@ -174,7 +174,6 @@ struct auxtrace_record *hisi_ptt_recording_init(int *er= r, } =20 pttr->hisi_ptt_pmu =3D hisi_ptt_pmu; - pttr->itr.pmu =3D hisi_ptt_pmu; pttr->itr.recording_options =3D hisi_ptt_recording_options; pttr->itr.info_priv_size =3D hisi_ptt_info_priv_size; pttr->itr.info_fill =3D hisi_ptt_info_fill; diff --git a/tools/perf/arch/x86/util/intel-bts.c b/tools/perf/arch/x86/uti= l/intel-bts.c index 34696f3d3d5d..85c8186300c8 100644 --- a/tools/perf/arch/x86/util/intel-bts.c +++ b/tools/perf/arch/x86/util/intel-bts.c @@ -434,7 +434,6 @@ struct auxtrace_record *intel_bts_recording_init(int *e= rr) } =20 btsr->intel_bts_pmu =3D intel_bts_pmu; - btsr->itr.pmu =3D intel_bts_pmu; btsr->itr.recording_options =3D intel_bts_recording_options; btsr->itr.info_priv_size =3D intel_bts_info_priv_size; btsr->itr.info_fill =3D intel_bts_info_fill; diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util= /intel-pt.c index 4b710e875953..ea510a7486b1 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -1197,7 +1197,6 @@ struct auxtrace_record *intel_pt_recording_init(int *= err) } =20 ptr->intel_pt_pmu =3D intel_pt_pmu; - ptr->itr.pmu =3D intel_pt_pmu; ptr->itr.recording_options =3D intel_pt_recording_options; ptr->itr.info_priv_size =3D intel_pt_info_priv_size; ptr->itr.info_fill =3D intel_pt_info_fill; diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 8a6ec9565835..95304368103b 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -411,7 +411,6 @@ struct auxtrace_record { int (*read_finish)(struct auxtrace_record *itr, int idx); unsigned int alignment; unsigned int default_aux_sample_size; - struct perf_pmu *pmu; struct evlist *evlist; }; =20 --=20 2.34.1 From nobody Sat Feb 7 11:38:03 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDB65194AD5; Fri, 9 Aug 2024 12:15:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205707; cv=none; b=G14hmXY2v65Qbb2n9kd7y67K07zT9Fuiui+yJtQ/4hs+pdquDYsus5eR9wRa7/J6YyaxvsmU75McuKtPd1P4N2auh0Wcb7hN9u0N+EgiXP9p8ZzXdLZ8flaNpNeKCzFdlPxrTgRjzCmcvDA9EeraxBIbcAAx0gb7VAikJkmikjA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205707; c=relaxed/simple; bh=30hxpOx+Ay3cMzYZivIdNmiukl0xv/8/y0q6pI9er+E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OAnJ13v/5gqmckoWn/DXOLSBvypgE5Tw6N9a0IPLhzLG+FQe7jSEarUA6rJYDC/r5ZBXqFXuFcL3hR+kwT6o/7Fo9OhS2pdCjF9uDDlUR5CMjgXgkMt7qUrv+flGVT+aHuPPg3jWLgZLY6kkwCIfYPNJ0n91ze8CpCgHlViVmKo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6EF131691; Fri, 9 Aug 2024 05:15:31 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CF3263F6A8; Fri, 9 Aug 2024 05:15:03 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , Suzuki K Poulose , Mike Leach , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v4 4/8] perf auxtrace: Introduce auxtrace_record__validate_events() Date: Fri, 9 Aug 2024 13:14:43 +0100 Message-Id: <20240809121447.2078084-5-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240809121447.2078084-1-leo.yan@arm.com> References: <20240809121447.2078084-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A prerequisite for multiple AUX events is that the AUX events cannot overlap CPU maps. The reason is that every CPU has only one AUX trace buffer and maps it to an unique buffer index for CPU and system tracing mode. To prevent the case of CPU maps overlapping occurring within multiple AUX events, the auxtrace_record__validate_events() function is introduced. It iterates through all AUX events and returns failure if it detects CPU maps overlapping. Signed-off-by: Leo Yan --- tools/perf/builtin-record.c | 4 +++ tools/perf/util/auxtrace.c | 64 +++++++++++++++++++++++++++++++++++++ tools/perf/util/auxtrace.h | 7 ++++ 3 files changed, 75 insertions(+) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 72345d1e54b0..dffb56052219 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -853,6 +853,10 @@ static int record__auxtrace_init(struct record *rec) =20 auxtrace_regroup_aux_output(rec->evlist); =20 + err =3D auxtrace_validate_events(rec->evlist); + if (err) + return err; + return auxtrace_parse_filters(rec->evlist); } =20 diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index c3f0ef4349fc..b51b98a80acf 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -2828,6 +2828,70 @@ int auxtrace_parse_filters(struct evlist *evlist) return 0; } =20 +int auxtrace_validate_events(struct evlist *evlist) +{ + struct evsel *evsel; + struct perf_cpu_map *cpu_map =3D NULL; + struct perf_cpu_map *cpu_map_intersect =3D NULL; + struct perf_cpu_map *cpu_map_merged =3D NULL; + int ret =3D 0; + + if (!evlist) + return 0; + + /* + * Currently the tool only supports multiple AUX events without + * overlapping CPU maps and every CPU has its unique AUX buffer + * for CPU or system mode tracing. + * + * Returns failure if detects CPU maps overlapping. + */ + evlist__for_each_entry(evlist, evsel) { + if (!evsel__is_aux_event(evsel)) + continue; + + if (perf_cpu_map__is_empty(evsel->pmu->cpus)) + continue; + + cpu_map_intersect =3D perf_cpu_map__intersect(cpu_map, evsel->pmu->cpus); + if (cpu_map_intersect) { + perf_cpu_map__put(cpu_map_intersect); + pr_err("Doesn't support AUX events with overlapping CPU masks\n"); + ret =3D -EINVAL; + break; + } + perf_cpu_map__put(cpu_map_intersect); + + cpu_map_merged =3D perf_cpu_map__merge(cpu_map, evsel->pmu->cpus); + if (!cpu_map_merged) { + ret =3D -ENOMEM; + break; + } + + /* Update the CPU maps after merging */ + perf_cpu_map__put(cpu_map); + cpu_map =3D cpu_map_merged; + } + + if (!ret) + goto out; + + /* If fails, dump CPU maps for debugging */ + evlist__for_each_entry(evlist, evsel) { + char buf[200]; + + if (!evsel__is_aux_event(evsel)) + continue; + + cpu_map__snprint(evsel->pmu->cpus, buf, sizeof(buf)); + pr_debug("AUX event [%s]'s cpu map is: %s\n", evsel->pmu->name, buf); + } + +out: + perf_cpu_map__put(cpu_map); + return ret; +} + int auxtrace__process_event(struct perf_session *session, union perf_event= *event, struct perf_sample *sample, struct perf_tool *tool) { diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 95304368103b..93478dd7319b 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -636,6 +636,7 @@ void addr_filters__exit(struct addr_filters *filts); int addr_filters__parse_bare_filter(struct addr_filters *filts, const char *filter); int auxtrace_parse_filters(struct evlist *evlist); +int auxtrace_validate_events(struct evlist *evlist); =20 int auxtrace__process_event(struct perf_session *session, union perf_event= *event, struct perf_sample *sample, struct perf_tool *tool); @@ -875,6 +876,12 @@ int auxtrace_parse_filters(struct evlist *evlist __may= be_unused) return 0; } =20 +static inline +int auxtrace_validate_events(struct evlist *evlist __maybe_unused) +{ + return 0; +} + int auxtrace_mmap__mmap(struct auxtrace_mmap *mm, struct auxtrace_mmap_params *mp, void *userpg, int fd); --=20 2.34.1 From nobody Sat Feb 7 11:38:04 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62792194C83; Fri, 9 Aug 2024 12:15:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205709; cv=none; b=Q2NuM2ErOX+1JFYbDLlAmN+IGAFSpTz5FffsEfq/7kglfUystTfpYmJjjJ4n+SUFTYlv74cjonV4OGCjYxhYH1IfGeNZpEXSxn+aOBhLDVT6k9X7UAyqJCBcoNBp/gJ+EKS2KxDQO68tVqCySEIWNig8muO2BbwhoZM45H7oxug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205709; c=relaxed/simple; bh=YyWvOR9uGmdxRAWpWvvQqCnyz8h2QAKQSUQZhO++sI0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=i3t4yN9DN0oO9kplJWSHrofUYCX7aix5nzQdWQkEJyQvgtXXVXF9qy6jvsICluiyEJMS67PL9AuVY1DPJ4d1N/nBXTzQIsbioKRwl5IT5+OKkqgUeUrAQJ3+WFOfOpSRtnjmpqHa70sL70gkvle56FFcuGBkkg7hX3WRIT8Vwis= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7435A1692; Fri, 9 Aug 2024 05:15:33 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D44953F6A8; Fri, 9 Aug 2024 05:15:05 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , Suzuki K Poulose , Mike Leach , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v4 5/8] perf auxtrace: Refactor evlist__enable_event_idx() Date: Fri, 9 Aug 2024 13:14:44 +0100 Message-Id: <20240809121447.2078084-6-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240809121447.2078084-1-leo.yan@arm.com> References: <20240809121447.2078084-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This commit splits the evlist__enable_event_idx() function into two steps. The first step uses a new function evlist__find_cpu_map_idx() to find the CPU map index, based on the found CPU map index or a thread map index, it continues to call evlist__enable_event_idx() for enabling the corresponding event. Signed-off-by: Leo Yan --- tools/perf/util/auxtrace.c | 42 +++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index b51b98a80acf..c970024f16db 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -651,20 +651,30 @@ int auxtrace_parse_snapshot_options(struct auxtrace_r= ecord *itr, return -EINVAL; } =20 -static int evlist__enable_event_idx(struct evlist *evlist, struct evsel *e= vsel, int idx) +static int evlist__find_cpu_map_idx(struct evlist *evlist, struct evsel *e= vsel, + int idx) { bool per_cpu_mmaps =3D !perf_cpu_map__has_any_cpu(evlist->core.user_reque= sted_cpus); + struct perf_cpu evlist_cpu; + int cpu_map_idx; =20 - if (per_cpu_mmaps) { - struct perf_cpu evlist_cpu =3D perf_cpu_map__cpu(evlist->core.all_cpus, = idx); - int cpu_map_idx =3D perf_cpu_map__idx(evsel->core.cpus, evlist_cpu); + if (!per_cpu_mmaps) + return -EINVAL; =20 - if (cpu_map_idx =3D=3D -1) - return -EINVAL; - return perf_evsel__enable_cpu(&evsel->core, cpu_map_idx); - } + evlist_cpu =3D perf_cpu_map__cpu(evlist->core.all_cpus, idx); + cpu_map_idx =3D perf_cpu_map__idx(evsel->core.cpus, evlist_cpu); + if (cpu_map_idx =3D=3D -1) + return -ENOENT; + + return cpu_map_idx; +} =20 - return perf_evsel__enable_thread(&evsel->core, idx); +static int evlist__enable_event_idx(struct evsel *evsel, int cpu_mode, int= idx) +{ + if (cpu_mode) + return perf_evsel__enable_cpu(&evsel->core, idx); + else + return perf_evsel__enable_thread(&evsel->core, idx); } =20 int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx) @@ -676,9 +686,21 @@ int auxtrace_record__read_finish(struct auxtrace_recor= d *itr, int idx) =20 evlist__for_each_entry(itr->evlist, evsel) { if (evsel__is_aux_event(evsel)) { + int cpu_map_idx; + if (evsel->disabled) return 0; - return evlist__enable_event_idx(itr->evlist, evsel, idx); + + cpu_map_idx =3D evlist__find_cpu_map_idx(itr->evlist, + evsel, idx); + /* No map is found in per CPU mmap */ + if (cpu_map_idx =3D=3D -ENOENT) + return cpu_map_idx; + + if (cpu_map_idx >=3D 0) + return evlist__enable_event_idx(evsel, 1, cpu_map_idx); + else + return evlist__enable_event_idx(evsel, 0, idx); } } return -EINVAL; --=20 2.34.1 From nobody Sat Feb 7 11:38:04 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 562A1195381; Fri, 9 Aug 2024 12:15:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205711; cv=none; b=iuznIHDqnKYEiyvuAxGkK619BdgQjIo0VjX/laD7O/ojVdi7v1zyLOjEiTqngxupCHDyoKdmDT53xrbMUjwE3ljszFaZL29CZw7CM/t/dh/tIKEv2PM1+GdahgXip7qMEOI0h9MMZovel1nu9xI88zqIeckp47cfFR8ogfp0I9g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205711; c=relaxed/simple; bh=YwarIFJ+JcZ8lK+zwj37i04m09xApkcJiPW64Kq0v2I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o322tVj06YuwGURrUTBQDkGgUUeHzYBRz/0uXsSPQCjupLwwgRX1a1y8BWe1l+937+QdUlNkEYW8u5u4JpxDHzhAxQWuM4raWWYXzTGkihAn/dyKOPQr9zlhd1jW/ZicUQULrcPrTiayHkmOoKg/4NfMOU9zARAVvz+BxHpqj4w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8253516F8; Fri, 9 Aug 2024 05:15:35 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D8D383F6A8; Fri, 9 Aug 2024 05:15:07 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , Suzuki K Poulose , Mike Leach , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v4 6/8] perf auxtrace: Bails out after finding the event for the map index Date: Fri, 9 Aug 2024 13:14:45 +0100 Message-Id: <20240809121447.2078084-7-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240809121447.2078084-1-leo.yan@arm.com> References: <20240809121447.2078084-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" After finding the corresponding event for the passed buffer index, it is safe to say the found event has been used. Then, the tool can check the event status and bails out if it has been disabled. Signed-off-by: Leo Yan --- tools/perf/util/auxtrace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index c970024f16db..ac6e2e428a66 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -688,15 +688,15 @@ int auxtrace_record__read_finish(struct auxtrace_reco= rd *itr, int idx) if (evsel__is_aux_event(evsel)) { int cpu_map_idx; =20 - if (evsel->disabled) - return 0; - cpu_map_idx =3D evlist__find_cpu_map_idx(itr->evlist, evsel, idx); /* No map is found in per CPU mmap */ if (cpu_map_idx =3D=3D -ENOENT) return cpu_map_idx; =20 + if (evsel->disabled) + return 0; + if (cpu_map_idx >=3D 0) return evlist__enable_event_idx(evsel, 1, cpu_map_idx); else --=20 2.34.1 From nobody Sat Feb 7 11:38:04 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44FA4195808; Fri, 9 Aug 2024 12:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205713; cv=none; b=r/nvnmisJ4T6k+JQZ0w21Dke5izDr7oOuzI5n3CsQc7HVTfWRbFlkiPY5r/rCZLd2G9Aqd76Avi0aS+567xJwa1nfIrFzY8GEcgiptB1n+CqX8Zb95+x33t9vDMHGIq5XlRie74F02zzEBJkaB3y4+ouY8FXRJiMPlYDVSnfITs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205713; c=relaxed/simple; bh=WcpFbyWNJb4YXSyjeH4OKmg5NTLwGzetomwVXL7t8HY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EkzY5mnSpg1Dm6sSzMSiBIWUwRo3YJtc2ab17v5AWBFCqosOL6JTojNmKmPCeHKkyBiaD5i+Mio9GWQj38vZC8C0Ja32XtFBUe4G+LfZScoQdtki6eZIrhAhPVELMQrK1qGpx+mHvKcw34ePfsDCtC2Om8HNZr/hKr4QLeY5hxg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 86F2D1713; Fri, 9 Aug 2024 05:15:37 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E6F1A3F6A8; Fri, 9 Aug 2024 05:15:09 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , Suzuki K Poulose , Mike Leach , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v4 7/8] perf auxtrace: Iterate all AUX events when finish reading Date: Fri, 9 Aug 2024 13:14:46 +0100 Message-Id: <20240809121447.2078084-8-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240809121447.2078084-1-leo.yan@arm.com> References: <20240809121447.2078084-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When finished to read AUX trace data from mmaped buffer, based on the AUX buffer index the core layer needs to search the corresponding PMU event and re-enable it to continue tracing. However, current code only searches the first AUX event. It misses to search other enabled AUX events, thus, it returns failure if the buffer index does not belong to the first AUX event. This patch changes to continue searching every enabled AUX events for covering the mmaped buffer indexes. Signed-off-by: Leo Yan --- tools/perf/util/auxtrace.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index ac6e2e428a66..9056bc7bcfce 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -690,9 +690,13 @@ int auxtrace_record__read_finish(struct auxtrace_recor= d *itr, int idx) =20 cpu_map_idx =3D evlist__find_cpu_map_idx(itr->evlist, evsel, idx); - /* No map is found in per CPU mmap */ + /* + * No map is found in per CPU mmap. Multiple AUX events + * might be opened in a session, continue to check if + * the next AUX event can cover the mmaped buffer 'idx'. + */ if (cpu_map_idx =3D=3D -ENOENT) - return cpu_map_idx; + continue; =20 if (evsel->disabled) return 0; --=20 2.34.1 From nobody Sat Feb 7 11:38:04 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4398C195F3B; Fri, 9 Aug 2024 12:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205715; cv=none; b=QmzMITV5FKe3MIa3JaThDki+NZHB49yI4MrsABEiyYCoWUSPbTtM36h0SDCR7GM0Fwt8h44326k2H2Msynoa06h8u1zSy1HFTa2SSgDKnwGy35wATRepL4oUfp2l5BUIH8rrrrN09bY7rWdUUz/YtNHPNKdxLIJopRX+0+13X38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723205715; c=relaxed/simple; bh=XxpPFAiZoGA4uzQEKtkMCrfMKV9LBjZfTjcn4vL39NY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jIYyoJDx8S8uczHgCNUGQjMsLKAL5iKP+z+e2wFRW26OhN5J0CeY+/LdeagLT3lOuskUZ1lGNCwnzVsY9GCye5EGfe97dbx8fwwPLKX1eBLe5StBChOGvpph6ATRKu139VFPCULbZhcfJ7hNYURNF5LwNjiTHdy6rO5EOMRCbIU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8AD7B1756; Fri, 9 Aug 2024 05:15:39 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EB2743F6A8; Fri, 9 Aug 2024 05:15:11 -0700 (PDT) From: Leo Yan To: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , Suzuki K Poulose , Mike Leach , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v4 8/8] perf arm-spe: Support multiple events in arm_spe_evsel_is_auxtrace() Date: Fri, 9 Aug 2024 13:14:47 +0100 Message-Id: <20240809121447.2078084-9-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240809121447.2078084-1-leo.yan@arm.com> References: <20240809121447.2078084-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The 'pmu_type' field is an unique value and cannot support multiple PMU events. The arm_spe_evsel_is_auxtrace() function changes to compare PMU name to decide if it is a Arm SPE event. This leads to the 'pmu_type' field is no longer used, remove it. Signed-off-by: Leo Yan --- tools/perf/util/arm-spe.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index afbd5869f6bf..7c27d5179470 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,6 @@ struct arm_spe { u32 auxtrace_type; struct perf_session *session; struct machine *machine; - u32 pmu_type; u64 midr; =20 struct perf_tsc_conversion tc; @@ -1053,12 +1053,10 @@ static void arm_spe_free(struct perf_session *sessi= on) free(spe); } =20 -static bool arm_spe_evsel_is_auxtrace(struct perf_session *session, +static bool arm_spe_evsel_is_auxtrace(struct perf_session *session __maybe= _unused, struct evsel *evsel) { - struct arm_spe *spe =3D container_of(session->auxtrace, struct arm_spe, a= uxtrace); - - return evsel->core.attr.type =3D=3D spe->pmu_type; + return strstarts(evsel->pmu_name, ARM_SPE_PMU_NAME); } =20 static const char * const arm_spe_info_fmts[] =3D { @@ -1128,7 +1126,7 @@ arm_spe_synth_events(struct arm_spe *spe, struct perf= _session *session) int err; =20 evlist__for_each_entry(evlist, evsel) { - if (evsel->core.attr.type =3D=3D spe->pmu_type) { + if (arm_spe_evsel_is_auxtrace(session, evsel)) { found =3D true; break; } @@ -1313,7 +1311,6 @@ int arm_spe_process_auxtrace_info(union perf_event *e= vent, spe->session =3D session; spe->machine =3D &session->machines.host; /* No kvm support */ spe->auxtrace_type =3D auxtrace_info->type; - spe->pmu_type =3D auxtrace_info->priv[ARM_SPE_PMU_TYPE]; spe->midr =3D midr; =20 spe->timeless_decoding =3D arm_spe__is_timeless_decoding(spe); --=20 2.34.1