powerpc: Add doorbell tracepoints
PATCH 1/1 powerpc: Add doorbell tracepoints
When analysing sources of OS jitter, I noticed that doorbells cannot be traced.
Signed-off-by Anton Blanchard <[email protected]>
--- arch/powerpc/include/asm/trace.h | 16 ++++++++++++++++ arch/powerpc/kernel/dbell.c | 3 +++ 2 files changed, 19 insertions(+)
arch/powerpc/include/asm/trace.h +16 -0
@@ -54,6 +54,22 @@ DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit,TP_ARGS (regs) ); +#ifdef CONFIG_PPC_DOORBELL +DEFINE_EVENT (ppc64_interrupt_class, doorbell_entry, + + TP_PROTO(struct pt_regs *regs), + +TP_ARGS (regs) +); + +DEFINE_EVENT (ppc64_interrupt_class, doorbell_exit, + + TP_PROTO(struct pt_regs *regs), + +TP_ARGS (regs) +); +#endif +#ifdef CONFIG_PPC_PSERIES extern int hcall_tracepoint_regfunc (void );extern void hcall_tracepoint_unregfunc (void );
arch/powerpc/kernel/dbell.c +3 -0
@@ -18,6 +18,7 @@#include <asm/dbell.h> #include <asm/irq_regs.h> #include <asm/kvm_ppc.h> +#include <asm/trace.h> #ifdef CONFIG_SMP
@@ -81,6 +82,7 @@ void doorbell_exception(struct pt_regs *regs)struct pt_regs *old_regs =set_irq_regs (regs);irq_enter (); +trace_doorbell_entry (regs);ppc_msgsync ();
@@ -91,6 +93,7 @@ void doorbell_exception(struct pt_regs *regs)smp_ipi_demux_relaxed ();/* already performed the barrier */ +trace_doorbell_exit (regs);irq_exit ();set_irq_regs (old_regs); }
Signature · 1 line
2.17.1
Michael Ellerman
AppliedQuoted 4 lines · Anton Blanchard
When analysing sources of OS jitter, I noticed that doorbells cannot be traced.
Signed-off-by Anton Blanchard <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/5b2a15296210d3b70e06d0f09a8e701f
cheers