tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs
PATCH 1/1 tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs
Perf tools side uses extended mask to display the platform supported register names (with -I? option) to the user
and also send this mask to the kernel to capture the extended registers as part of each sample. This mask value is decided based on the processor version ( from PVR ).
Add PVR value for power11 to enable capturing the extended regs as part of sample in power11.
---
tools/perf/arch/powerpc/util/perf_regs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/arch/powerpc/util/perf_regs.c +2 -1
@@ -16,6 +16,7 @@#define PVR_POWER9 0x004E#define PVR_POWER10 0x0080 +#define PVR_POWER11 0x0082static const struct sample_reg sample_reg_masks[] = {SMPL_REG (r0,PERF_REG_POWERPC_R0 ),
@@ -207,7 +208,7 @@ uint64_t arch__intr_reg_mask(void) version = (((mfspr (SPRN_PVR )) >>16 ) &0xFFFF );if (version ==PVR_POWER9 ) extended_mask =PERF_REG_PMU_MASK_300 ; -else if (version ==PVR_POWER10 ) +else if ((version ==PVR_POWER10 ) || (version ==PVR_POWER11 )) extended_mask =PERF_REG_PMU_MASK_31 ;else return mask;
Signature · 1 line
2.43.5
Quoted 8 lines · Athira Rajeev
Perf tools side uses extended mask to display the platform supported register names (with -I? option) to the user
and also send this mask to the kernel to capture the extended registers as part of each sample. This mask value is decided based on the processor version ( from PVR ).Add PVR value for power11 to enable capturing the extended regs as part of sample in power11.
Patch looks fine to me.
Quoted 28 lines
Signed-off-by Athira Rajeev <[email protected]>---
tools/perf/arch/powerpc/util/perf_regs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/perf/arch/powerpc/util/perf_regs.c +2
-1@@ -16,6 +16,7 @@#define PVR_POWER9 0x004E#define PVR_POWER10 0x0080 +#define PVR_POWER11 0x0082static const struct sample_reg sample_reg_masks[] = {SMPL_REG (r0,PERF_REG_POWERPC_R0 ),@@ -207,7 +208,7 @@ uint64_t arch__intr_reg_mask(void) version = (((mfspr (SPRN_PVR )) >>16 ) &0xFFFF );if (version ==PVR_POWER9 ) extended_mask =PERF_REG_PMU_MASK_300 ; -else if (version ==PVR_POWER10 ) +else if ((version ==PVR_POWER10 ) || (version ==PVR_POWER11 )) extended_mask =PERF_REG_PMU_MASK_31 ;else return mask;
Quoted 13 lines · kajoljain
Quoted 6 lines · Athira Rajeev
Perf tools side uses extended mask to display the platform supported register names (with -I? option) to the user
and also send this mask to the kernel to capture the extended registers as part of each sample. This mask value is decided based on the processor version ( from PVR ).
Quoted 6 lines
Quoted 2 lines
Add PVR value for power11 to enable capturing the extended regs as part of sample in power11.
Patch looks fine to me.
Reviewed-by Kajol Jain <[email protected]>
Hi
Can we please pull in this patch if it looks fine.
Thanks
Athira
Quoted 31 lines
Quoted 30 lines
Signed-off-by Athira Rajeev <[email protected]>---
tools/perf/arch/powerpc/util/perf_regs.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)tools/perf/arch/powerpc/util/perf_regs.c +2
-1@@ -16,6 +16,7 @@#define PVR_POWER9 0x004E#define PVR_POWER10 0x0080 +#define PVR_POWER11 0x0082static const struct sample_reg sample_reg_masks[] = {SMPL_REG (r0,PERF_REG_POWERPC_R0 ),@@ -207,7 +208,7 @@ uint64_t arch__intr_reg_mask(void) version = (((mfspr (SPRN_PVR )) >>16 ) &0xFFFF );if (version ==PVR_POWER9 ) extended_mask =PERF_REG_PMU_MASK_300 ; -else if (version ==PVR_POWER10 ) +else if ((version ==PVR_POWER10 ) || (version ==PVR_POWER11 )) extended_mask =PERF_REG_PMU_MASK_31 ;else
return mask;
Quoted 8 lines · Athira Rajeev
Quoted 7 lines · kajoljain
Quoted 5 lines · Athira Rajeev
Perf tools side uses extended mask to display the platform supported register names (with -I? option) to the user
and also send this mask to the kernel to capture the extended registers as part of each sample. This mask value is decided based on the processor version ( from PVR ).
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Add PVR value for power11 to enable capturing the extended regs as part of sample in power11.
Patch looks fine to me.
Reviewed-by Kajol Jain <[email protected]>Can we please pull in this patch if it looks fine.
Sure,
Thanks, applied to perf-tools-next,
- Arnaldo
Quoted 20 lines · Arnaldo Carvalho de Melo
Quoted 14 lines · Athira Rajeev
Quoted 14 lines · kajoljain
Quoted 8 lines · Athira Rajeev
Perf tools side uses extended mask to display the platform supported register names (with -I? option) to the user
and also send this mask to the kernel to capture the extended registers as part of each sample. This mask value is decided based on the processor version ( from PVR ).Add PVR value for power11 to enable capturing the extended regs as part of sample in power11.
Patch looks fine to me.
Reviewed-by Kajol Jain <[email protected]>
Quoted 7 lines
Quoted 1 line
Can we please pull in this patch if it looks fine.
Sure,
Thanks, applied to perf-tools-next,
- Arnaldo
Thanks Arnaldo for pulling this in
Athira