From: Leo Yan <leo.yan@arm.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
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>,
Mark Rutland <mark.rutland@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-perf-users@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 18/25] perf/uapi: Extend data source fields
Date: Tue, 18 Nov 2025 17:05:43 +0000 [thread overview]
Message-ID: <20251118170543.GB8204@e132581.arm.com> (raw)
In-Reply-To: <20251112-perf_support_arm_spev1-3-v3-18-e63c9829f9d9@arm.com>
On Wed, Nov 12, 2025 at 06:24:44PM +0000, Leo Yan wrote:
> Arm CPUs introduce several new types of memory operations, like MTE tag
> accessing, system register access for nested virtualization, memcpy &
> memset, and Guarded Control Stack (GCS).
>
> For memory operation details, Arm SPE provides information like data
> (parallel) processing, floating-point, predicated, atomic, exclusive,
> acquire/release, gather/scatter, and conditional.
>
> This commit introduces a field 'mem_op_ext' for extended operation type.
> The extended operation type can be combined with the existed operation
> type to express a memory type, for examples, a PERF_MEM_OP_GCS type can
> be set along with PERF_MEM_OP_LOAD to present a load operation for
> GCS register access.
>
> Bit fields are also added to represent detailed operation attributes.
>
> Signed-off-by: Leo Yan <leo.yan@arm.com>
Just ping perf core maintainers, is this uAPI change okay for you?
Thanks for Ian's and James' review!
Leo
> ---
> include/uapi/linux/perf_event.h | 32 ++++++++++++++++++++++++++++++--
> 1 file changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
> index 78a362b8002776e5ce83a0d7816601638c61ecc6..9b9fa59fd828756b5e8e93520da5a269f0dfff52 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -1309,14 +1309,32 @@ union perf_mem_data_src {
> mem_snoopx : 2, /* Snoop mode, ext */
> mem_blk : 3, /* Access blocked */
> mem_hops : 3, /* Hop level */
> - mem_rsvd : 18;
> + mem_op_ext : 4, /* Extended type of opcode */
> + mem_dp : 1, /* Data processing */
> + mem_fp : 1, /* Floating-point */
> + mem_pred : 1, /* Predicated */
> + mem_atomic : 1, /* Atomic operation */
> + mem_excl : 1, /* Exclusive */
> + mem_ar : 1, /* Acquire/release */
> + mem_sg : 1, /* Scatter/Gather */
> + mem_cond : 1, /* Conditional */
> + mem_rsvd : 6;
> };
> };
> #elif defined(__BIG_ENDIAN_BITFIELD)
> union perf_mem_data_src {
> __u64 val;
> struct {
> - __u64 mem_rsvd : 18,
> + __u64 mem_rsvd : 6,
> + mem_cond : 1, /* Conditional */
> + mem_sg : 1, /* Scatter/Gather */
> + mem_ar : 1, /* Acquire/release */
> + mem_excl : 1, /* Exclusive */
> + mem_atomic : 1, /* Atomic operation */
> + mem_pred : 1, /* Predicated */
> + mem_fp : 1, /* Floating-point */
> + mem_dp : 1, /* Data processing */
> + mem_op_ext : 4, /* Extended type of opcode */
> mem_hops : 3, /* Hop level */
> mem_blk : 3, /* Access blocked */
> mem_snoopx : 2, /* Snoop mode, ext */
> @@ -1426,6 +1444,16 @@ union perf_mem_data_src {
> /* 5-7 available */
> #define PERF_MEM_HOPS_SHIFT 43
>
> +/* Extended type of memory opcode: */
> +#define PERF_MEM_EXT_OP_NA 0x0 /* Not available */
> +#define PERF_MEM_EXT_OP_MTE_TAG 0x1 /* MTE tag */
> +#define PERF_MEM_EXT_OP_NESTED_VIRT 0x2 /* Nested virtualization */
> +#define PERF_MEM_EXT_OP_MEMCPY 0x3 /* Memory copy */
> +#define PERF_MEM_EXT_OP_MEMSET 0x4 /* Memory set */
> +#define PERF_MEM_EXT_OP_SIMD 0x5 /* SIMD */
> +#define PERF_MEM_EXT_OP_GCS 0x6 /* Guarded Control Stack */
> +#define PERF_MEM_EXT_OP_SHIFT 46
> +
> #define PERF_MEM_S(a, s) \
> (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)
>
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-11-18 17:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 18:24 [PATCH v3 00/25] perf arm_spe: Extend operations Leo Yan
2025-11-12 18:24 ` [PATCH v3 01/25] perf arm_spe: Fix memset subclass in operation Leo Yan
2025-11-12 18:24 ` [PATCH v3 02/25] perf arm_spe: Unify operation naming Leo Yan
2025-11-12 18:24 ` [PATCH v3 03/25] perf arm_spe: Decode GCS operation Leo Yan
2025-11-12 18:24 ` [PATCH v3 04/25] perf arm_spe: Rename SPE_OP_PKT_IS_OTHER_SVE_OP macro Leo Yan
2025-11-12 18:24 ` [PATCH v3 05/25] perf arm_spe: Decode ASE and FP fields in other operation Leo Yan
2025-11-12 18:24 ` [PATCH v3 06/25] perf arm_spe: Decode SME data processing packet Leo Yan
2025-11-12 18:24 ` [PATCH v3 07/25] perf arm_spe: Remove unused operation types Leo Yan
2025-11-12 18:24 ` [PATCH v3 08/25] perf arm_spe: Consolidate " Leo Yan
2025-11-12 18:24 ` [PATCH v3 09/25] perf arm_spe: Introduce data processing macro for SVE operations Leo Yan
2025-11-12 18:24 ` [PATCH v3 10/25] perf arm_spe: Report register access in record Leo Yan
2025-11-12 18:24 ` [PATCH v3 11/25] perf arm_spe: Report MTE allocation tag " Leo Yan
2025-11-12 18:24 ` [PATCH v3 12/25] perf arm_spe: Report extended memory operations in records Leo Yan
2025-11-12 18:24 ` [PATCH v3 13/25] perf arm_spe: Report associated info for SVE / SME operations Leo Yan
2025-11-12 18:24 ` [PATCH v3 14/25] perf arm_spe: Report memset and memcpy in records Leo Yan
2025-11-12 18:24 ` [PATCH v3 15/25] perf arm_spe: Report GCS in record Leo Yan
2025-11-12 18:24 ` [PATCH v3 16/25] perf arm_spe: Expose SIMD information in other operations Leo Yan
2025-11-12 18:24 ` [PATCH v3 17/25] perf arm_spe: Synthesize memory samples for SIMD operations Leo Yan
2025-11-12 18:24 ` [PATCH v3 18/25] perf/uapi: Extend data source fields Leo Yan
2025-11-18 17:05 ` Leo Yan [this message]
2025-11-12 18:24 ` [PATCH v3 19/25] tools/include: Sync uapi/linux/perf.h with the kernel sources Leo Yan
2025-11-12 18:24 ` [PATCH v3 20/25] perf mem: Print extended fields Leo Yan
2025-11-12 18:24 ` [PATCH v3 21/25] perf arm_spe: Set extended fields in data source Leo Yan
2025-11-12 18:24 ` [PATCH v3 22/25] perf sort: Support sort ASE and SME Leo Yan
2025-11-12 18:24 ` [PATCH v3 23/25] perf sort: Sort disabled and full predicated flags Leo Yan
2025-11-12 18:24 ` [PATCH v3 24/25] perf report: Update document for SIMD flags Leo Yan
2025-11-12 18:24 ` [PATCH v3 25/25] perf arm_spe: Improve SIMD flags setting Leo Yan
2025-11-13 17:01 ` [PATCH v3 00/25] perf arm_spe: Extend operations Ian Rogers
2025-11-17 7:20 ` Namhyung Kim
2025-11-18 10:23 ` James Clark
2025-11-19 18:10 ` Namhyung Kim
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=20251118170543.GB8204@e132581.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-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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).