* [PATCH] powerpc/perf: Update perf_regs structure to include SIER
@ 2018-07-10 10:29 Madhavan Srinivasan
2018-08-14 10:16 ` Madhavan Srinivasan
0 siblings, 1 reply; 3+ messages in thread
From: Madhavan Srinivasan @ 2018-07-10 10:29 UTC (permalink / raw)
To: mpe
Cc: linuxppc-dev, Madhavan Srinivasan, Arnaldo Carvalho de Melo,
Jiri Olsa, Namhyung Kim, Alexander Shishkin, Anju T Sudhakar,
Ravi Bangoria
On each sample, Sample Instruction Event Register (SIER) content
is saved in pt_regs. SIER does not have a entry as-is in the pt_regs
but instead, SIER content is saved in the "dar" register of pt_regs.
Patch adds another entry to the perf_regs structure to include the "SIER"
printing which internally maps to the "dar" of pt_regs.
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
arch/powerpc/include/uapi/asm/perf_regs.h | 1 +
arch/powerpc/perf/perf_regs.c | 1 +
tools/arch/powerpc/include/uapi/asm/perf_regs.h | 1 +
tools/perf/arch/powerpc/include/perf_regs.h | 3 ++-
tools/perf/arch/powerpc/util/perf_regs.c | 1 +
5 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/uapi/asm/perf_regs.h b/arch/powerpc/include/uapi/asm/perf_regs.h
index 9e52c86ccbd3..ff91192407d1 100644
--- a/arch/powerpc/include/uapi/asm/perf_regs.h
+++ b/arch/powerpc/include/uapi/asm/perf_regs.h
@@ -46,6 +46,7 @@ enum perf_event_powerpc_regs {
PERF_REG_POWERPC_TRAP,
PERF_REG_POWERPC_DAR,
PERF_REG_POWERPC_DSISR,
+ PERF_REG_POWERPC_SIER,
PERF_REG_POWERPC_MAX,
};
#endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
diff --git a/arch/powerpc/perf/perf_regs.c b/arch/powerpc/perf/perf_regs.c
index 09ceea6175ba..c262aea22ad9 100644
--- a/arch/powerpc/perf/perf_regs.c
+++ b/arch/powerpc/perf/perf_regs.c
@@ -69,6 +69,7 @@ static unsigned int pt_regs_offset[PERF_REG_POWERPC_MAX] = {
PT_REGS_OFFSET(PERF_REG_POWERPC_TRAP, trap),
PT_REGS_OFFSET(PERF_REG_POWERPC_DAR, dar),
PT_REGS_OFFSET(PERF_REG_POWERPC_DSISR, dsisr),
+ PT_REGS_OFFSET(PERF_REG_POWERPC_SIER, dar),
};
u64 perf_reg_value(struct pt_regs *regs, int idx)
diff --git a/tools/arch/powerpc/include/uapi/asm/perf_regs.h b/tools/arch/powerpc/include/uapi/asm/perf_regs.h
index 9e52c86ccbd3..ff91192407d1 100644
--- a/tools/arch/powerpc/include/uapi/asm/perf_regs.h
+++ b/tools/arch/powerpc/include/uapi/asm/perf_regs.h
@@ -46,6 +46,7 @@ enum perf_event_powerpc_regs {
PERF_REG_POWERPC_TRAP,
PERF_REG_POWERPC_DAR,
PERF_REG_POWERPC_DSISR,
+ PERF_REG_POWERPC_SIER,
PERF_REG_POWERPC_MAX,
};
#endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
diff --git a/tools/perf/arch/powerpc/include/perf_regs.h b/tools/perf/arch/powerpc/include/perf_regs.h
index 00e37b106913..1076393e6f43 100644
--- a/tools/perf/arch/powerpc/include/perf_regs.h
+++ b/tools/perf/arch/powerpc/include/perf_regs.h
@@ -62,7 +62,8 @@ static const char *reg_names[] = {
[PERF_REG_POWERPC_SOFTE] = "softe",
[PERF_REG_POWERPC_TRAP] = "trap",
[PERF_REG_POWERPC_DAR] = "dar",
- [PERF_REG_POWERPC_DSISR] = "dsisr"
+ [PERF_REG_POWERPC_DSISR] = "dsisr",
+ [PERF_REG_POWERPC_SIER] = "sier"
};
static inline const char *perf_reg_name(int id)
diff --git a/tools/perf/arch/powerpc/util/perf_regs.c b/tools/perf/arch/powerpc/util/perf_regs.c
index ec50939b0418..07fcd977d93e 100644
--- a/tools/perf/arch/powerpc/util/perf_regs.c
+++ b/tools/perf/arch/powerpc/util/perf_regs.c
@@ -52,6 +52,7 @@ const struct sample_reg sample_reg_masks[] = {
SMPL_REG(trap, PERF_REG_POWERPC_TRAP),
SMPL_REG(dar, PERF_REG_POWERPC_DAR),
SMPL_REG(dsisr, PERF_REG_POWERPC_DSISR),
+ SMPL_REG(sier, PERF_REG_POWERPC_SIER),
SMPL_REG_END
};
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/perf: Update perf_regs structure to include SIER
2018-07-10 10:29 [PATCH] powerpc/perf: Update perf_regs structure to include SIER Madhavan Srinivasan
@ 2018-08-14 10:16 ` Madhavan Srinivasan
2018-08-14 10:41 ` Ravi Bangoria
0 siblings, 1 reply; 3+ messages in thread
From: Madhavan Srinivasan @ 2018-08-14 10:16 UTC (permalink / raw)
To: mpe, Arnaldo Carvalho de Melo
Cc: linuxppc-dev, Jiri Olsa, Namhyung Kim, Alexander Shishkin,
Anju T Sudhakar, Ravi Bangoria
Hi arnaldo,
Any comments or ack for this patch.
With regards
Maddy
On Tuesday 10 July 2018 03:59 PM, Madhavan Srinivasan wrote:
> On each sample, Sample Instruction Event Register (SIER) content
> is saved in pt_regs. SIER does not have a entry as-is in the pt_regs
> but instead, SIER content is saved in the "dar" register of pt_regs.
>
> Patch adds another entry to the perf_regs structure to include the "SIER"
> printing which internally maps to the "dar" of pt_regs.
>
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: Anju T Sudhakar <anju@linux.vnet.ibm.com>
> Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
> ---
> arch/powerpc/include/uapi/asm/perf_regs.h | 1 +
> arch/powerpc/perf/perf_regs.c | 1 +
> tools/arch/powerpc/include/uapi/asm/perf_regs.h | 1 +
> tools/perf/arch/powerpc/include/perf_regs.h | 3 ++-
> tools/perf/arch/powerpc/util/perf_regs.c | 1 +
> 5 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/uapi/asm/perf_regs.h b/arch/powerpc/include/uapi/asm/perf_regs.h
> index 9e52c86ccbd3..ff91192407d1 100644
> --- a/arch/powerpc/include/uapi/asm/perf_regs.h
> +++ b/arch/powerpc/include/uapi/asm/perf_regs.h
> @@ -46,6 +46,7 @@ enum perf_event_powerpc_regs {
> PERF_REG_POWERPC_TRAP,
> PERF_REG_POWERPC_DAR,
> PERF_REG_POWERPC_DSISR,
> + PERF_REG_POWERPC_SIER,
> PERF_REG_POWERPC_MAX,
> };
> #endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
> diff --git a/arch/powerpc/perf/perf_regs.c b/arch/powerpc/perf/perf_regs.c
> index 09ceea6175ba..c262aea22ad9 100644
> --- a/arch/powerpc/perf/perf_regs.c
> +++ b/arch/powerpc/perf/perf_regs.c
> @@ -69,6 +69,7 @@ static unsigned int pt_regs_offset[PERF_REG_POWERPC_MAX] = {
> PT_REGS_OFFSET(PERF_REG_POWERPC_TRAP, trap),
> PT_REGS_OFFSET(PERF_REG_POWERPC_DAR, dar),
> PT_REGS_OFFSET(PERF_REG_POWERPC_DSISR, dsisr),
> + PT_REGS_OFFSET(PERF_REG_POWERPC_SIER, dar),
> };
>
> u64 perf_reg_value(struct pt_regs *regs, int idx)
> diff --git a/tools/arch/powerpc/include/uapi/asm/perf_regs.h b/tools/arch/powerpc/include/uapi/asm/perf_regs.h
> index 9e52c86ccbd3..ff91192407d1 100644
> --- a/tools/arch/powerpc/include/uapi/asm/perf_regs.h
> +++ b/tools/arch/powerpc/include/uapi/asm/perf_regs.h
> @@ -46,6 +46,7 @@ enum perf_event_powerpc_regs {
> PERF_REG_POWERPC_TRAP,
> PERF_REG_POWERPC_DAR,
> PERF_REG_POWERPC_DSISR,
> + PERF_REG_POWERPC_SIER,
> PERF_REG_POWERPC_MAX,
> };
> #endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
> diff --git a/tools/perf/arch/powerpc/include/perf_regs.h b/tools/perf/arch/powerpc/include/perf_regs.h
> index 00e37b106913..1076393e6f43 100644
> --- a/tools/perf/arch/powerpc/include/perf_regs.h
> +++ b/tools/perf/arch/powerpc/include/perf_regs.h
> @@ -62,7 +62,8 @@ static const char *reg_names[] = {
> [PERF_REG_POWERPC_SOFTE] = "softe",
> [PERF_REG_POWERPC_TRAP] = "trap",
> [PERF_REG_POWERPC_DAR] = "dar",
> - [PERF_REG_POWERPC_DSISR] = "dsisr"
> + [PERF_REG_POWERPC_DSISR] = "dsisr",
> + [PERF_REG_POWERPC_SIER] = "sier"
> };
>
> static inline const char *perf_reg_name(int id)
> diff --git a/tools/perf/arch/powerpc/util/perf_regs.c b/tools/perf/arch/powerpc/util/perf_regs.c
> index ec50939b0418..07fcd977d93e 100644
> --- a/tools/perf/arch/powerpc/util/perf_regs.c
> +++ b/tools/perf/arch/powerpc/util/perf_regs.c
> @@ -52,6 +52,7 @@ const struct sample_reg sample_reg_masks[] = {
> SMPL_REG(trap, PERF_REG_POWERPC_TRAP),
> SMPL_REG(dar, PERF_REG_POWERPC_DAR),
> SMPL_REG(dsisr, PERF_REG_POWERPC_DSISR),
> + SMPL_REG(sier, PERF_REG_POWERPC_SIER),
> SMPL_REG_END
> };
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/perf: Update perf_regs structure to include SIER
2018-08-14 10:16 ` Madhavan Srinivasan
@ 2018-08-14 10:41 ` Ravi Bangoria
0 siblings, 0 replies; 3+ messages in thread
From: Ravi Bangoria @ 2018-08-14 10:41 UTC (permalink / raw)
To: Madhavan Srinivasan, mpe, Arnaldo Carvalho de Melo
Cc: linuxppc-dev, Jiri Olsa, Namhyung Kim, Alexander Shishkin,
Anju T Sudhakar, Ravi Bangoria
On 08/14/2018 03:46 PM, Madhavan Srinivasan wrote:
> Hi arnaldo,
>
> Any comments or ack for this patch.
Tested-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Thanks,
Ravi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-14 13:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10 10:29 [PATCH] powerpc/perf: Update perf_regs structure to include SIER Madhavan Srinivasan
2018-08-14 10:16 ` Madhavan Srinivasan
2018-08-14 10:41 ` Ravi Bangoria
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).