From nobody Sun Dec 14 06:36:33 2025 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC8772D7DC3; Fri, 12 Dec 2025 17:25:09 +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=1765560311; cv=none; b=BXBUXkJ95xWNavuwnYks+Wo/EJLGoOfMxjpDrpU1cGiIFdiuzRzvaPfzo5mMNnQ1FEzpeH7jDTj8Kxu1uxglA87EV3Di8db/4Q9Ye/MaViEYwOrA9wVX4GLvr84KleFBZ6E2GP8dfO/ELFxLZ7UXNAkNO6ERXRR70Dg+9+jqBzc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765560311; c=relaxed/simple; bh=BVRuC5QKnJ/z2ZEeUzEx34gL2ArjI7gvoGzXbqZSg4o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I1gYf4fwJ0O1JtTrmP50djqkH7jh5BZ4D9h9TxY9PI90sP3C+OrNaw+zWNvndUt2PshKnp87bTdQlVePywFqk8Y9MiFLwJyZC4KJ9DxZZo8/3qnePsCV4K/ig4XenEX/ssTAStD2tBn/knwfPR26qwuZabZeRywz782eG46ki/k= 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 058681575; Fri, 12 Dec 2025 09:25:02 -0800 (PST) Received: from e132581.arm.com (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5746D3F762; Fri, 12 Dec 2025 09:25:07 -0800 (PST) From: Leo Yan Date: Fri, 12 Dec 2025 17:24:59 +0000 Subject: [PATCH v2 1/2] perf mem: Simplify Arm SPE event config Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-perf_c2c_update_event-v2-1-27df9a6cb1d4@arm.com> References: <20251212-perf_c2c_update_event-v2-0-27df9a6cb1d4@arm.com> In-Reply-To: <20251212-perf_c2c_update_event-v2-0-27df9a6cb1d4@arm.com> To: Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers , James Clark , Mike Leach , Will Deacon , Mark Rutland , Jiri Olsa , Adrian Hunter , Al Grant Cc: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Leo Yan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1765560304; l=1280; i=leo.yan@arm.com; s=20250604; h=from:subject:message-id; bh=BVRuC5QKnJ/z2ZEeUzEx34gL2ArjI7gvoGzXbqZSg4o=; b=ehFYhgtqv1Aud4+MWUfiqUzamXtqM/R2Bar0O1Q9w3ZWUlOdPu2h26e0Qwj6E46PjqeERCN6L jo5jJ0d1JE4CY2QkoKiTcz5Z0UXPPRZ9rrqpTccVedQ56tCC+ptV15B X-Developer-Key: i=leo.yan@arm.com; a=ed25519; pk=k4BaDbvkCXzBFA7Nw184KHGP5thju8lKqJYIrOWxDhI= Since configuration fields default to zero, the zero assignments are redundant, remove them. Reviewed-by: James Clark Signed-off-by: Leo Yan --- tools/perf/arch/arm64/util/mem-events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/arch/arm64/util/mem-events.c b/tools/perf/arch/arm6= 4/util/mem-events.c index 9f8da7937255cc9b14c3c58a1119b40bd0c76f6b..eaf00e0609c6c1b7d939a02fe37= 94471d1ed119b 100644 --- a/tools/perf/arch/arm64/util/mem-events.c +++ b/tools/perf/arch/arm64/util/mem-events.c @@ -6,7 +6,7 @@ #define E(t, n, s, l, a) { .tag =3D t, .name =3D n, .event_name =3D s, .ld= lat =3D l, .aux_event =3D a } =20 struct perf_mem_event perf_mem_events_arm[PERF_MEM_EVENTS__MAX] =3D { - E("spe-load", "%s/ts_enable=3D1,pa_enable=3D1,load_filter=3D1,store_filte= r=3D0,min_latency=3D%u/", NULL, true, 0), - E("spe-store", "%s/ts_enable=3D1,pa_enable=3D1,load_filter=3D0,store_filt= er=3D1/", NULL, false, 0), + E("spe-load", "%s/ts_enable=3D1,pa_enable=3D1,load_filter=3D1,min_latency= =3D%u/", NULL, true, 0), + E("spe-store", "%s/ts_enable=3D1,pa_enable=3D1,store_filter=3D1/", NULL= , false, 0), E("spe-ldst", "%s/ts_enable=3D1,pa_enable=3D1,load_filter=3D1,store_filte= r=3D1,min_latency=3D%u/", NULL, true, 0), }; --=20 2.34.1 From nobody Sun Dec 14 06:36:33 2025 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03A33260578; Fri, 12 Dec 2025 17:25:11 +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=1765560315; cv=none; b=YbDMEMXtyk5ESU8iIGPCrM6JvBvwe4cluBQgeyZWUuPvVfkhD4DO659Z4RJCZDGCOf5hjhT9y0FAUL7sCpbLx3ZadoixR+vQFXCe2JmP1sT7GCRrYgZBF7MxFWUsphgwUvQhtQmoxOxqAXF7t8cY0t5L/FUTZkMQ25lTKRRnquc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765560315; c=relaxed/simple; bh=4sENnGgYOHx/gUayinw+QoHCGnkzWEnPWvka3BMCrtU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iqQHfwg+o+JscZb7k6EosQ8vUh4Cy/8guoJJeyArizYQAaV+AYSDaDvQ63jWGzPeIQR7JmCXUpYWUxqSwx1Lv/Z3XDU/jIc6kUN2r6JZvYR/qBjkGvnALpcUwAyBcdIQ4L/n4ObHx9DnxiQ+bqtHVBXtPwoP0C7h3Y+x9aykbZo= 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 2E55C165C; Fri, 12 Dec 2025 09:25:04 -0800 (PST) Received: from e132581.arm.com (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7FDB13F762; Fri, 12 Dec 2025 09:25:09 -0800 (PST) From: Leo Yan Date: Fri, 12 Dec 2025 17:25:00 +0000 Subject: [PATCH v2 2/2] perf c2c: Update documentation for adding memory event table Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-perf_c2c_update_event-v2-2-27df9a6cb1d4@arm.com> References: <20251212-perf_c2c_update_event-v2-0-27df9a6cb1d4@arm.com> In-Reply-To: <20251212-perf_c2c_update_event-v2-0-27df9a6cb1d4@arm.com> To: Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers , James Clark , Mike Leach , Will Deacon , Mark Rutland , Jiri Olsa , Adrian Hunter , Al Grant Cc: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Leo Yan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1765560305; l=5821; i=leo.yan@arm.com; s=20250604; h=from:subject:message-id; bh=4sENnGgYOHx/gUayinw+QoHCGnkzWEnPWvka3BMCrtU=; b=jxujxi9t2BzTy6A7hBC9TsDumro1k4Km+1WDkJS5SoA0uaZ+GSte//QNRQepJDkvlZC8wrXM6 AMaIIiB27eJDFScd1aPp7JVMoPmfMwIWs5Yq91SihUsH36dCaNdxuA1 X-Developer-Key: i=leo.yan@arm.com; a=ed25519; pk=k4BaDbvkCXzBFA7Nw184KHGP5thju8lKqJYIrOWxDhI= Users may occasionally need to see which options are applied to memory events. This helps to understand the behavior of "perf c2c" and "perf mem", and provides guidance for configuring memory event options directly. Add a table to track memory events and their corresponding options, and include the Arm SPE events in it. Suggested-by: Al Grant Signed-off-by: Leo Yan --- tools/perf/Documentation/perf-c2c.txt | 51 +++++++++++++++++++++++++------= ---- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/tools/perf/Documentation/perf-c2c.txt b/tools/perf/Documentati= on/perf-c2c.txt index 40b0f71a2c44eb642ff3bb234631a614b7c4fc9d..e57a122b8719f1b2e20dd509959= fc1563a6c20fd 100644 --- a/tools/perf/Documentation/perf-c2c.txt +++ b/tools/perf/Documentation/perf-c2c.txt @@ -160,20 +160,43 @@ Following perf record options are configured by defau= lt: =20 -W,-d,--phys-data,--sample-cpu =20 -Unless specified otherwise with '-e' option, following events are monitore= d by -default on Intel: - - cpu/mem-loads,ldlat=3D30/P - cpu/mem-stores/P - -following on AMD: - - ibs_op// - -and following on PowerPC: - - cpu/mem-loads/ - cpu/mem-stores/ +The following table lists the events monitored on different architectures. +Unless specified otherwise with the -e option, the tool will select the +default events. + + +--------+---------------+-----------------+----------------------------= ----------------------------------------------------+ + | Arch | Configuration | Options | Events = | + +--------+---------------+-----------------+----------------------------= ----------------------------------------------------+ + | Intel | Default | -e ldlat-loads | cpu/mem-loads,ldlat=3D30/P = | + | | | -e ldlat-stores | cpu/mem-stores/P = | + | |---------------+-----------------+----------------------------= ----------------------------------------------------+ + | | Load only | -e ldlat-loads | cpu/mem-loads,ldlat=3D30/P = | + | |---------------+-----------------+----------------------------= ----------------------------------------------------+ + | | Store only | -e ldlat-stores | cpu/mem-stores/P = | + +--------+---------------+-----------------+----------------------------= ----------------------------------------------------+ + | Intel | Default | -e ldlat-loads | {cpu/mem-loads-aux/,cpu/mem= -loads,ldlat=3D30/}:P | + | with | | -e ldlat-stores | cpu/mem-stores/P = | + | AUX |--------------+------------------+----------------------------= ----------------------------------------------------+ + | | Load only | -e ldlat-loads | {cpu/mem-loads-aux/,cpu/mem= -loads,ldlat=3D30/}:P | + | |---------------+-----------------+----------------------------= ----------------------------------------------------+ + | | Store only | -e ldlat-stores | cpu/mem-stores/P = | + +--------+---------------+-----------------+----------------------------= ----------------------------------------------------+ + | AMD | Default | -e mem-ldst | ibs_op// (without latency s= upport) | + | | | | ibs_op/ldlat=3D30/ (with la= tency support) | + +--------+---------------+-----------------+----------------------------= ----------------------------------------------------+ + | PowerPC| Default | -e ldlat-loads | cpu/mem-loads/ = | + | | | -e ldlat-stores | cpu/mem-stores/ = | + | |---------------+-----------------+----------------------------= ----------------------------------------------------+ + | | Load only | -e ldlat-loads | cpu/mem-loads/ = | + | |---------------+-----------------+----------------------------= ----------------------------------------------------+ + | | Store only | -e ldlat-stores | cpu/mem-stores/ = | + +--------+---------------+-----------------+----------------------------= ----------------------------------------------------+ + | Arm | Default | -e spe-ldst | arm_spe_0/ts_enable=3D1,pa_= enable=3D1,load_filter=3D1,store_filter=3D1,min_latency=3D30/ | + | SPE |---------------+-----------------+----------------------------= ----------------------------------------------------+ + | | Load only | -e spe-load | arm_spe_0/ts_enable=3D1,pa_= enable=3D1,load_filter=3D1,min_latency=3D30/ | + | |---------------+-----------------+----------------------------= ----------------------------------------------------+ + | | Store only | -e spe-store | arm_spe_0/ts_enable=3D1,pa_= enable=3D1,store_filter=3D1/ | + +--------+---------------+-----------------+----------------------------= ----------------------------------------------------+ =20 User can pass any 'perf record' option behind '--' mark, like (to enable callchains and system wide monitoring): --=20 2.34.1