[PATCH v1 0/3] arm64: Support Cortex-X4 CPU for Perf Arm SPE

Leo Yan posted 3 patches 1 year, 9 months ago
arch/arm64/include/asm/cputype.h       |  2 ++
tools/arch/arm64/include/asm/cputype.h |  2 ++
tools/perf/util/arm-spe.c              | 14 ++++++++------
3 files changed, 12 insertions(+), 6 deletions(-)
[PATCH v1 0/3] arm64: Support Cortex-X4 CPU for Perf Arm SPE
Posted by Leo Yan 1 year, 9 months ago
This series support Cortex-X4 CPU in Perf Arm SPE.

The Arm64 and tools both include the header cputype.h for CPU part and
MIDR definitions, to de-couple between the tools and the kernel, the
tools doesn't directly use the kernel's header, alternatively, the tools
maintain a copy and sync with kernel's header.

To keep the exact same content between kernel and tools' headers, this
series firstly adds Cortex-X4 CPU part and MIDR definitions in the
kernel header; then the second patch syncs the change into the tools'
header.  The first patch is to support the Cortex-X4 in perf Arm SPE
with the new CPU definitions.

I don't have Cortex-X4 machine in hand, so just verified with
compilation perf tool.


Leo Yan (3):
  arm64: Add Cortex-X4 CPU part definitions
  tools headers arm64: Sync Cortex-X4 CPU part definitions
  perf arm-spe: Support data source for Cortex-X4 CPU

 arch/arm64/include/asm/cputype.h       |  2 ++
 tools/arch/arm64/include/asm/cputype.h |  2 ++
 tools/perf/util/arm-spe.c              | 14 ++++++++------
 3 files changed, 12 insertions(+), 6 deletions(-)

-- 
2.34.1
Re: [PATCH v1 0/3] arm64: Support Cortex-X4 CPU for Perf Arm SPE
Posted by Ali Saidi 1 year, 9 months ago
Hi Leo,

On Mon, 17 Jul 2023 05:43:24 +0000, Leo Yan wrote:
> This series support Cortex-X4 CPU in Perf Arm SPE.
> 
> The Arm64 and tools both include the header cputype.h for CPU part and
> MIDR definitions, to de-couple between the tools and the kernel, the
> tools doesn't directly use the kernel's header, alternatively, the tools
> maintain a copy and sync with kernel's header.
> 
> To keep the exact same content between kernel and tools' headers, this
> series firstly adds Cortex-X4 CPU part and MIDR definitions in the
> kernel header; then the second patch syncs the change into the tools'
> header.  The first patch is to support the Cortex-X4 in perf Arm SPE
> with the new CPU definitions.
> 
> I don't have Cortex-X4 machine in hand, so just verified with
> compilation perf tool.

This looks good to me, but can we add the other cores that operate the
same way now too? Flipping through the TRMs A78, X3, V2, X1, A715,
A720, and A78C all have the same encodings. 

Reviewed-by: Ali Saidi <alisaidi@amazon.com>

Thanks!
Ali
Re: [PATCH v1 0/3] arm64: Support Cortex-X4 CPU for Perf Arm SPE
Posted by Leo Yan 1 year, 9 months ago
Hi Ali,

On Fri, Jul 21, 2023 at 06:16:53PM +0000, Ali Saidi wrote:

> > This series support Cortex-X4 CPU in Perf Arm SPE.

[...]

> This looks good to me, but can we add the other cores that operate the
> same way now too? Flipping through the TRMs A78, X3, V2, X1, A715,
> A720, and A78C all have the same encodings. 

Thanks a lot for exploring more CPU variants which share the same data
source packet format.

The latest Linux kernel have defined the CPU part number and MIDR for
below CPU variants:

- A78
- X1
- A715
- A78C

I would like to use a patch to support these CPUs in perf tool.  Given
other CPU variants (X3/V2/A720) have not been supported in the kernel,
and so far no one requests them, I would like leave them out.

Please let me know if this okay for you or not.


> Reviewed-by: Ali Saidi <alisaidi@amazon.com>

Thanks for review, I will add your review tags in the new patch set.

Leo
Re: [PATCH v1 0/3] arm64: Support Cortex-X4 CPU for Perf Arm SPE
Posted by Arnaldo Carvalho de Melo 1 year, 9 months ago
Em Mon, Jul 24, 2023 at 07:30:13PM +0800, Leo Yan escreveu:
> Hi Ali,
> 
> On Fri, Jul 21, 2023 at 06:16:53PM +0000, Ali Saidi wrote:
> 
> > > This series support Cortex-X4 CPU in Perf Arm SPE.
> 
> [...]
> 
> > This looks good to me, but can we add the other cores that operate the
> > same way now too? Flipping through the TRMs A78, X3, V2, X1, A715,
> > A720, and A78C all have the same encodings. 
> 
> Thanks a lot for exploring more CPU variants which share the same data
> source packet format.
> 
> The latest Linux kernel have defined the CPU part number and MIDR for
> below CPU variants:
> 
> - A78
> - X1
> - A715
> - A78C
> 
> I would like to use a patch to support these CPUs in perf tool.  Given
> other CPU variants (X3/V2/A720) have not been supported in the kernel,
> and so far no one requests them, I would like leave them out.
> 
> Please let me know if this okay for you or not.
> 
> 
> > Reviewed-by: Ali Saidi <alisaidi@amazon.com>
> 
> Thanks for review, I will add your review tags in the new patch set.

Ok, waiting for the new patch set.

- Arnaldo