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
Add the part number and MIDR definitions for Cortex-X4.
Signed-off-by: Leo Yan <redacted>
---
arch/arm64/include/asm/cputype.h | 2 ++
1 file changed, 2 insertions(+)
Sync Cortex-X4 CPU part number and MIDR definitions with the kernel
header.
Signed-off-by: Leo Yan <redacted>
---
tools/arch/arm64/include/asm/cputype.h | 2 ++
1 file changed, 2 insertions(+)
We have a CPU list to maintain Neoverse CPUs (N1/N2/V2), this list is
used for parsing data source packet. Since Cortex-x4 CPU shares the
same data source format with Neoverse CPUs, this commit adds Cortex-x4
CPU into the CPU list so we can reuse the parsing logic.
The CPU list was assumed for only Neoverse CPUs, but now Cortex-X4 has
been added into the list. To avoid Neoverse specific naming, this patch
renames the variables and function as the default data source format.
Signed-off-by: Leo Yan <redacted>
---
tools/perf/util/arm-spe.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
From: Ali Saidi <hidden> Date: 2023-07-21 18:17:24
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 <redacted>
Thanks!
Ali
We have a CPU list to maintain Neoverse CPUs (N1/N2/V2), this list is
used for parsing data source packet. Since Cortex-x4 CPU shares the
same data source format with Neoverse CPUs, this commit adds Cortex-x4
CPU into the CPU list so we can reuse the parsing logic.
The CPU list was assumed for only Neoverse CPUs, but now Cortex-X4 has
been added into the list. To avoid Neoverse specific naming, this patch
renames the variables and function as the default data source format.
Signed-off-by: Leo Yan <redacted>
---
tools/perf/util/arm-spe.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
@@ -409,15 +409,16 @@ static int arm_spe__synth_instruction_sample(struct arm_spe_queue *speq,returnarm_spe_deliver_synth_event(spe,speq,event,&sample);}-staticconststructmidr_rangeneoverse_spe[]={+staticconststructmidr_rangecpus_use_default_data_src[]={
Is not 'cpus_use_default_data_src' too long ? 'use' could be dropped ?
quoted hunk
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V1),+ MIDR_ALL_VERSIONS(MIDR_CORTEX_X4), {}, };-static void arm_spe__synth_data_source_neoverse(const struct arm_spe_record *record,- union perf_mem_data_src *data_src)+static void arm_spe__synth_data_source_default(const struct arm_spe_record *record,+ union perf_mem_data_src *data_src) { /* * Even though four levels of cache hierarchy are possible, no known
Hi Ali,
On Fri, Jul 21, 2023 at 06:16:53PM +0000, Ali Saidi wrote:
quoted
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 <redacted>
Thanks for review, I will add your review tags in the new patch set.
Leo
From: Arnaldo Carvalho de Melo <acme@kernel.org> Date: 2023-07-28 14:38:19
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:
quoted
quoted
This series support Cortex-X4 CPU in Perf Arm SPE.
[...]
quoted
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.
quoted
Reviewed-by: Ali Saidi <redacted>
Thanks for review, I will add your review tags in the new patch set.