linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
	 Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	 Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	 James Clark <james.clark@linaro.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
	 linux-perf-users@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,  Leo Yan <leo.yan@arm.com>
Subject: [PATCH v2 21/25] perf arm_spe: Set extended fields in data source
Date: Fri, 17 Oct 2025 11:05:10 +0100	[thread overview]
Message-ID: <20251017-perf_support_arm_spev1-3-v2-21-2d41e4746e1b@arm.com> (raw)
In-Reply-To: <20251017-perf_support_arm_spev1-3-v2-0-2d41e4746e1b@arm.com>

Set extended operation type and affiliate info in the data source.

Before:

  perf script -F,dso,sym,data_src
  sve-test 6516696.714341:        288100144 |OP STORE|LVL L1 hit|SNP None|TLB Walker hit|LCK No|BLK  N/A|AFF N/A
  sve-test 6516696.714341:        288100144 |OP STORE|LVL L1 hit|SNP None|TLB Walker hit|LCK No|BLK  N/A|AFF N/A
  sve-test 6516696.714341:        288100144 |OP STORE|LVL L1 hit|SNP None|TLB Walker hit|LCK No|BLK  N/A|AFF N/A
  sve-test 6516696.714344:        288800142 |OP LOAD|LVL L1 hit|SNP HitM|TLB Walker hit|LCK No|BLK  N/A|AFF N/A
  sve-test 6516696.714344:        288800142 |OP LOAD|LVL L1 hit|SNP HitM|TLB Walker hit|LCK No|BLK  N/A|AFF N/A

After:

  perf script -F,dso,sym,data_src
  sve-test 6516696.714341:  444000288100144 |OP STORE SIMD|LVL L1 hit|SNP None|TLB Walker hit|LCK No|BLK  N/A|AFF PRED SG
  sve-test 6516696.714341:  444000288100144 |OP STORE SIMD|LVL L1 hit|SNP None|TLB Walker hit|LCK No|BLK  N/A|AFF PRED SG
  sve-test 6516696.714341:  444000288100144 |OP STORE SIMD|LVL L1 hit|SNP None|TLB Walker hit|LCK No|BLK  N/A|AFF PRED SG
  sve-test 6516696.714344:        288800142 |OP LOAD|LVL L1 hit|SNP HitM|TLB Walker hit|LCK No|BLK  N/A|AFF N/A
  sve-test 6516696.714344:        288800142 |OP LOAD|LVL L1 hit|SNP HitM|TLB Walker hit|LCK No|BLK  N/A|AFF N/A

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
 tools/perf/util/arm-spe.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index bc233a5007d20e4dec11eeb1554adc1580f43718..e9df50b2cb807185c939f6712e9d65a41aacce87 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -1000,6 +1000,36 @@ arm_spe__synth_data_source(struct arm_spe_queue *speq,
 	else
 		data_src.mem_op = PERF_MEM_OP_NA;
 
+	if (record->op & ARM_SPE_OP_MTE_TAG)
+		data_src.mem_op_ext = PERF_MEM_EXT_OP_MTE_TAG;
+	else if (record->op & ARM_SPE_OP_NV_SYSREG)
+		data_src.mem_op_ext = PERF_MEM_EXT_OP_NESTED_VIRT;
+	else if (record->op & ARM_SPE_OP_MEMCPY)
+		data_src.mem_op_ext = PERF_MEM_EXT_OP_MEMCPY;
+	else if (record->op & ARM_SPE_OP_MEMSET)
+		data_src.mem_op_ext = PERF_MEM_EXT_OP_MEMSET;
+	else if (record->op & ARM_SPE_OP_GCS)
+		data_src.mem_op_ext = PERF_MEM_EXT_OP_GCS;
+	else if (is_simd_op(record->op))
+		data_src.mem_op_ext = PERF_MEM_EXT_OP_SIMD;
+
+	if (record->op & ARM_SPE_OP_DP)
+		data_src.mem_dp = 1;
+	if (record->op & ARM_SPE_OP_FP)
+		data_src.mem_fp = 1;
+	if (record->op & ARM_SPE_OP_PRED)
+		data_src.mem_pred = 1;
+	if (record->op & ARM_SPE_OP_ATOMIC)
+		data_src.mem_atomic = 1;
+	if (record->op & ARM_SPE_OP_EXCL)
+		data_src.mem_excl = 1;
+	if (record->op & ARM_SPE_OP_AR)
+		data_src.mem_ar = 1;
+	if (record->op & ARM_SPE_OP_SG)
+		data_src.mem_sg = 1;
+	if (record->op & ARM_SPE_OP_COND)
+		data_src.mem_cond = 1;
+
 	arm_spe__synth_ds(speq, record, &data_src);
 	arm_spe__synth_memory_level(speq, record, &data_src);
 

-- 
2.34.1


  parent reply	other threads:[~2025-10-17 10:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17 10:04 [PATCH v2 00/25] perf arm_spe: Extend operations Leo Yan
2025-10-17 10:04 ` [PATCH v2 01/25] perf arm_spe: Fix memset subclass in operation Leo Yan
2025-10-17 10:04 ` [PATCH v2 02/25] perf arm_spe: Unify operation naming Leo Yan
2025-10-17 10:04 ` [PATCH v2 03/25] perf arm_spe: Decode GCS operation Leo Yan
2025-10-17 10:04 ` [PATCH v2 04/25] perf arm_spe: Rename SPE_OP_PKT_IS_OTHER_SVE_OP macro Leo Yan
2025-10-17 10:04 ` [PATCH v2 05/25] perf arm_spe: Decode ASE and FP fields in other operation Leo Yan
2025-10-17 10:04 ` [PATCH v2 06/25] perf arm_spe: Decode SME data processing packet Leo Yan
2025-10-17 10:04 ` [PATCH v2 07/25] perf arm_spe: Remove unused operation types Leo Yan
2025-10-17 10:04 ` [PATCH v2 08/25] perf arm_spe: Consolidate " Leo Yan
2025-10-17 10:04 ` [PATCH v2 09/25] perf arm_spe: Introduce data processing macro for SVE operations Leo Yan
2025-10-17 10:04 ` [PATCH v2 10/25] perf arm_spe: Report register access in record Leo Yan
2025-10-17 10:05 ` [PATCH v2 11/25] perf arm_spe: Report MTE allocation tag " Leo Yan
2025-10-17 10:05 ` [PATCH v2 12/25] perf arm_spe: Report extended memory operations in records Leo Yan
2025-10-17 10:05 ` [PATCH v2 13/25] perf arm_spe: Report associated info for SVE / SME operations Leo Yan
2025-10-17 10:05 ` [PATCH v2 14/25] perf arm_spe: Report memset and memcpy in records Leo Yan
2025-10-17 10:05 ` [PATCH v2 15/25] perf arm_spe: Report GCS in record Leo Yan
2025-10-17 10:05 ` [PATCH v2 16/25] perf arm_spe: Expose SIMD information in other operations Leo Yan
2025-10-17 10:05 ` [PATCH v2 17/25] perf arm_spe: Synthesize memory samples for SIMD operations Leo Yan
2025-10-17 10:05 ` [PATCH v2 18/25] perf/uapi: Extend data source fields Leo Yan
2025-10-17 10:05 ` [PATCH v2 19/25] tools/include: Sync uapi/linux/perf.h with the kernel sources Leo Yan
2025-10-17 10:05 ` [PATCH v2 20/25] perf mem: Print extended fields Leo Yan
2025-10-17 10:05 ` Leo Yan [this message]
2025-10-17 10:05 ` [PATCH v2 22/25] perf sort: Support sort ASE and SME Leo Yan
2025-10-17 10:05 ` [PATCH v2 23/25] perf sort: Sort disabled and full predicated flags Leo Yan
2025-10-17 10:05 ` [PATCH v2 24/25] perf report: Update document for SIMD flags Leo Yan
2025-10-17 10:05 ` [PATCH v2 25/25] perf arm_spe: Improve SIMD flags setting Leo Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251017-perf_support_arm_spev1-3-v2-21-2d41e4746e1b@arm.com \
    --to=leo.yan@arm.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).