[PATCH v3 00/25] perf arm_spe: Extend operations

Leo Yan posted 25 patches 2 months, 4 weeks ago
There is a newer version of this series
include/uapi/linux/perf_event.h                    | 32 ++++++++-
tools/include/uapi/linux/perf_event.h              | 32 ++++++++-
tools/perf/Documentation/perf-report.txt           |  5 +-
tools/perf/util/arm-spe-decoder/arm-spe-decoder.c  | 56 ++++++++++++++--
tools/perf/util/arm-spe-decoder/arm-spe-decoder.h  | 61 +++++++++--------
.../util/arm-spe-decoder/arm-spe-pkt-decoder.c     | 53 ++++++++-------
.../util/arm-spe-decoder/arm-spe-pkt-decoder.h     | 40 +++++++----
tools/perf/util/arm-spe.c                          | 77 +++++++++++++++++-----
tools/perf/util/mem-events.c                       | 66 +++++++++++++++++--
tools/perf/util/sample.h                           | 21 ++++--
tools/perf/util/sort.c                             | 21 ++++--
11 files changed, 359 insertions(+), 105 deletions(-)
[PATCH v3 00/25] perf arm_spe: Extend operations
Posted by Leo Yan 2 months, 4 weeks ago
This series enhances tooling to support new operations:

  - Support for MTE tag since Arm SPE v1.3;
  - Support for Advanced SIMD extension and SVE operations;
  - Support memcpy, memset and GCS operations;
  - Support extended operations for atomic, Acquire/Release and
    Exclusive instructions.
  - Enhance the data source for associated info, like floating-point,
    conditional, data processing, etc.

This series is divided into three parts:

  Patches 01 ~ 06: Support raw dump for new operations;
  Patches 07 ~ 17: Export the operation info into records, so that the
                   information can be later consumed by samples.
  Patches 18 ~ 25: Set the operation info into sample's data source and
                   SIMD flag, and updated the document.

This patch series is tested on FVP for native parsing and x86_64 for
cross parsing.

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
Changes in v3:
- Rebased on the latest perf-tools-next branch.
- Link to v2: https://lore.kernel.org/r/20251017-perf_support_arm_spev1-3-v2-0-2d41e4746e1b@arm.com

Changes in v2:
- Refined to use enums for 2nd operation types. (James)
- Avoided adjustment bit positions for operations. (James)
- Used enum for extended operation type in uapi header and defined
  individual bit field for operation details in uaip header. (James)
- Refined SIMD flag definitions. (James)
- Extracted a separate commit for updating tool's header. (James/Arnaldo)
- Minor improvement for printing memory events.
- Rebased on the latest perf-tools-next branch.
- Link to v1: https://lore.kernel.org/r/20250929-perf_support_arm_spev1-3-v1-0-1150b3c83857@arm.com

---
Leo Yan (25):
      perf arm_spe: Fix memset subclass in operation
      perf arm_spe: Unify operation naming
      perf arm_spe: Decode GCS operation
      perf arm_spe: Rename SPE_OP_PKT_IS_OTHER_SVE_OP macro
      perf arm_spe: Decode ASE and FP fields in other operation
      perf arm_spe: Decode SME data processing packet
      perf arm_spe: Remove unused operation types
      perf arm_spe: Consolidate operation types
      perf arm_spe: Introduce data processing macro for SVE operations
      perf arm_spe: Report register access in record
      perf arm_spe: Report MTE allocation tag in record
      perf arm_spe: Report extended memory operations in records
      perf arm_spe: Report associated info for SVE / SME operations
      perf arm_spe: Report memset and memcpy in records
      perf arm_spe: Report GCS in record
      perf arm_spe: Expose SIMD information in other operations
      perf arm_spe: Synthesize memory samples for SIMD operations
      perf/uapi: Extend data source fields
      tools/include: Sync uapi/linux/perf.h with the kernel sources
      perf mem: Print extended fields
      perf arm_spe: Set extended fields in data source
      perf sort: Support sort ASE and SME
      perf sort: Sort disabled and full predicated flags
      perf report: Update document for SIMD flags
      perf arm_spe: Improve SIMD flags setting

 include/uapi/linux/perf_event.h                    | 32 ++++++++-
 tools/include/uapi/linux/perf_event.h              | 32 ++++++++-
 tools/perf/Documentation/perf-report.txt           |  5 +-
 tools/perf/util/arm-spe-decoder/arm-spe-decoder.c  | 56 ++++++++++++++--
 tools/perf/util/arm-spe-decoder/arm-spe-decoder.h  | 61 +++++++++--------
 .../util/arm-spe-decoder/arm-spe-pkt-decoder.c     | 53 ++++++++-------
 .../util/arm-spe-decoder/arm-spe-pkt-decoder.h     | 40 +++++++----
 tools/perf/util/arm-spe.c                          | 77 +++++++++++++++++-----
 tools/perf/util/mem-events.c                       | 66 +++++++++++++++++--
 tools/perf/util/sample.h                           | 21 ++++--
 tools/perf/util/sort.c                             | 21 ++++--
 11 files changed, 359 insertions(+), 105 deletions(-)
---
base-commit: da8fcfba0854dbe0b0eca465d35620c9cf4c89c1
change-id: 20250820-perf_support_arm_spev1-3-b6efd6fc77b2

Best regards,
-- 
Leo Yan <leo.yan@arm.com>
Re: [PATCH v3 00/25] perf arm_spe: Extend operations
Posted by Ian Rogers 2 months, 3 weeks ago
On Wed, Nov 12, 2025 at 10:24 AM Leo Yan <leo.yan@arm.com> wrote:
>
> This series enhances tooling to support new operations:
>
>   - Support for MTE tag since Arm SPE v1.3;
>   - Support for Advanced SIMD extension and SVE operations;
>   - Support memcpy, memset and GCS operations;
>   - Support extended operations for atomic, Acquire/Release and
>     Exclusive instructions.
>   - Enhance the data source for associated info, like floating-point,
>     conditional, data processing, etc.
>
> This series is divided into three parts:
>
>   Patches 01 ~ 06: Support raw dump for new operations;
>   Patches 07 ~ 17: Export the operation info into records, so that the
>                    information can be later consumed by samples.
>   Patches 18 ~ 25: Set the operation info into sample's data source and
>                    SIMD flag, and updated the document.
>
> This patch series is tested on FVP for native parsing and x86_64 for
> cross parsing.
>
> Signed-off-by: Leo Yan <leo.yan@arm.com>

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks!
Ian

> ---
> Changes in v3:
> - Rebased on the latest perf-tools-next branch.
> - Link to v2: https://lore.kernel.org/r/20251017-perf_support_arm_spev1-3-v2-0-2d41e4746e1b@arm.com
>
> Changes in v2:
> - Refined to use enums for 2nd operation types. (James)
> - Avoided adjustment bit positions for operations. (James)
> - Used enum for extended operation type in uapi header and defined
>   individual bit field for operation details in uaip header. (James)
> - Refined SIMD flag definitions. (James)
> - Extracted a separate commit for updating tool's header. (James/Arnaldo)
> - Minor improvement for printing memory events.
> - Rebased on the latest perf-tools-next branch.
> - Link to v1: https://lore.kernel.org/r/20250929-perf_support_arm_spev1-3-v1-0-1150b3c83857@arm.com
>
> ---
> Leo Yan (25):
>       perf arm_spe: Fix memset subclass in operation
>       perf arm_spe: Unify operation naming
>       perf arm_spe: Decode GCS operation
>       perf arm_spe: Rename SPE_OP_PKT_IS_OTHER_SVE_OP macro
>       perf arm_spe: Decode ASE and FP fields in other operation
>       perf arm_spe: Decode SME data processing packet
>       perf arm_spe: Remove unused operation types
>       perf arm_spe: Consolidate operation types
>       perf arm_spe: Introduce data processing macro for SVE operations
>       perf arm_spe: Report register access in record
>       perf arm_spe: Report MTE allocation tag in record
>       perf arm_spe: Report extended memory operations in records
>       perf arm_spe: Report associated info for SVE / SME operations
>       perf arm_spe: Report memset and memcpy in records
>       perf arm_spe: Report GCS in record
>       perf arm_spe: Expose SIMD information in other operations
>       perf arm_spe: Synthesize memory samples for SIMD operations
>       perf/uapi: Extend data source fields
>       tools/include: Sync uapi/linux/perf.h with the kernel sources
>       perf mem: Print extended fields
>       perf arm_spe: Set extended fields in data source
>       perf sort: Support sort ASE and SME
>       perf sort: Sort disabled and full predicated flags
>       perf report: Update document for SIMD flags
>       perf arm_spe: Improve SIMD flags setting
>
>  include/uapi/linux/perf_event.h                    | 32 ++++++++-
>  tools/include/uapi/linux/perf_event.h              | 32 ++++++++-
>  tools/perf/Documentation/perf-report.txt           |  5 +-
>  tools/perf/util/arm-spe-decoder/arm-spe-decoder.c  | 56 ++++++++++++++--
>  tools/perf/util/arm-spe-decoder/arm-spe-decoder.h  | 61 +++++++++--------
>  .../util/arm-spe-decoder/arm-spe-pkt-decoder.c     | 53 ++++++++-------
>  .../util/arm-spe-decoder/arm-spe-pkt-decoder.h     | 40 +++++++----
>  tools/perf/util/arm-spe.c                          | 77 +++++++++++++++++-----
>  tools/perf/util/mem-events.c                       | 66 +++++++++++++++++--
>  tools/perf/util/sample.h                           | 21 ++++--
>  tools/perf/util/sort.c                             | 21 ++++--
>  11 files changed, 359 insertions(+), 105 deletions(-)
> ---
> base-commit: da8fcfba0854dbe0b0eca465d35620c9cf4c89c1
> change-id: 20250820-perf_support_arm_spev1-3-b6efd6fc77b2
>
> Best regards,
> --
> Leo Yan <leo.yan@arm.com>
>
Re: [PATCH v3 00/25] perf arm_spe: Extend operations
Posted by Namhyung Kim 2 months, 3 weeks ago
Hello,

On Thu, Nov 13, 2025 at 09:01:47AM -0800, Ian Rogers wrote:
> On Wed, Nov 12, 2025 at 10:24 AM Leo Yan <leo.yan@arm.com> wrote:
> >
> > This series enhances tooling to support new operations:
> >
> >   - Support for MTE tag since Arm SPE v1.3;
> >   - Support for Advanced SIMD extension and SVE operations;
> >   - Support memcpy, memset and GCS operations;
> >   - Support extended operations for atomic, Acquire/Release and
> >     Exclusive instructions.
> >   - Enhance the data source for associated info, like floating-point,
> >     conditional, data processing, etc.
> >
> > This series is divided into three parts:
> >
> >   Patches 01 ~ 06: Support raw dump for new operations;
> >   Patches 07 ~ 17: Export the operation info into records, so that the
> >                    information can be later consumed by samples.
> >   Patches 18 ~ 25: Set the operation info into sample's data source and
> >                    SIMD flag, and updated the document.
> >
> > This patch series is tested on FVP for native parsing and x86_64 for
> > cross parsing.
> >
> > Signed-off-by: Leo Yan <leo.yan@arm.com>
> 
> Reviewed-by: Ian Rogers <irogers@google.com>

Can I get some comments from ARM folks?  I think I can merge part 1 and
2 before changing the kernel interface.

Thanks,
Namhyung

Re: [PATCH v3 00/25] perf arm_spe: Extend operations
Posted by James Clark 2 months, 3 weeks ago

On 17/11/2025 7:20 am, Namhyung Kim wrote:
> Hello,
> 
> On Thu, Nov 13, 2025 at 09:01:47AM -0800, Ian Rogers wrote:
>> On Wed, Nov 12, 2025 at 10:24 AM Leo Yan <leo.yan@arm.com> wrote:
>>>
>>> This series enhances tooling to support new operations:
>>>
>>>    - Support for MTE tag since Arm SPE v1.3;
>>>    - Support for Advanced SIMD extension and SVE operations;
>>>    - Support memcpy, memset and GCS operations;
>>>    - Support extended operations for atomic, Acquire/Release and
>>>      Exclusive instructions.
>>>    - Enhance the data source for associated info, like floating-point,
>>>      conditional, data processing, etc.
>>>
>>> This series is divided into three parts:
>>>
>>>    Patches 01 ~ 06: Support raw dump for new operations;
>>>    Patches 07 ~ 17: Export the operation info into records, so that the
>>>                     information can be later consumed by samples.
>>>    Patches 18 ~ 25: Set the operation info into sample's data source and
>>>                     SIMD flag, and updated the document.
>>>
>>> This patch series is tested on FVP for native parsing and x86_64 for
>>> cross parsing.
>>>
>>> Signed-off-by: Leo Yan <leo.yan@arm.com>
>>
>> Reviewed-by: Ian Rogers <irogers@google.com>
> 
> Can I get some comments from ARM folks?  I think I can merge part 1 and
> 2 before changing the kernel interface.
> 
> Thanks,
> Namhyung
> 

Reviewed-by: James Clark <james.clark@linaro.org>


Re: [PATCH v3 00/25] perf arm_spe: Extend operations
Posted by Namhyung Kim 2 months, 3 weeks ago
On Tue, Nov 18, 2025 at 10:23:57AM +0000, James Clark wrote:
> 
> 
> On 17/11/2025 7:20 am, Namhyung Kim wrote:
> > Hello,
> > 
> > On Thu, Nov 13, 2025 at 09:01:47AM -0800, Ian Rogers wrote:
> > > On Wed, Nov 12, 2025 at 10:24 AM Leo Yan <leo.yan@arm.com> wrote:
> > > > 
> > > > This series enhances tooling to support new operations:
> > > > 
> > > >    - Support for MTE tag since Arm SPE v1.3;
> > > >    - Support for Advanced SIMD extension and SVE operations;
> > > >    - Support memcpy, memset and GCS operations;
> > > >    - Support extended operations for atomic, Acquire/Release and
> > > >      Exclusive instructions.
> > > >    - Enhance the data source for associated info, like floating-point,
> > > >      conditional, data processing, etc.
> > > > 
> > > > This series is divided into three parts:
> > > > 
> > > >    Patches 01 ~ 06: Support raw dump for new operations;
> > > >    Patches 07 ~ 17: Export the operation info into records, so that the
> > > >                     information can be later consumed by samples.
> > > >    Patches 18 ~ 25: Set the operation info into sample's data source and
> > > >                     SIMD flag, and updated the document.
> > > > 
> > > > This patch series is tested on FVP for native parsing and x86_64 for
> > > > cross parsing.
> > > > 
> > > > Signed-off-by: Leo Yan <leo.yan@arm.com>
> > > 
> > > Reviewed-by: Ian Rogers <irogers@google.com>
> > 
> > Can I get some comments from ARM folks?  I think I can merge part 1 and
> > 2 before changing the kernel interface.
> > 
> > Thanks,
> > Namhyung
> > 
> 
> Reviewed-by: James Clark <james.clark@linaro.org>
 
Thanks, applied the patch up to 17 to perf-tools-next!

Best regards,
Namhyung