Commit 5b2a1529 authored by Anton Blanchard's avatar Anton Blanchard Committed by Michael Ellerman

powerpc: Add doorbell tracepoints

When analysing sources of OS jitter, I noticed that doorbells cannot be
traced.
Signed-off-by: default avatarAnton Blanchard <anton@ozlabs.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 32eeb561
...@@ -54,6 +54,22 @@ DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit, ...@@ -54,6 +54,22 @@ DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit,
TP_ARGS(regs) 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 #ifdef CONFIG_PPC_PSERIES
extern int hcall_tracepoint_regfunc(void); extern int hcall_tracepoint_regfunc(void);
extern void hcall_tracepoint_unregfunc(void); extern void hcall_tracepoint_unregfunc(void);
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <asm/dbell.h> #include <asm/dbell.h>
#include <asm/irq_regs.h> #include <asm/irq_regs.h>
#include <asm/kvm_ppc.h> #include <asm/kvm_ppc.h>
#include <asm/trace.h>
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
...@@ -81,6 +82,7 @@ void doorbell_exception(struct pt_regs *regs) ...@@ -81,6 +82,7 @@ void doorbell_exception(struct pt_regs *regs)
struct pt_regs *old_regs = set_irq_regs(regs); struct pt_regs *old_regs = set_irq_regs(regs);
irq_enter(); irq_enter();
trace_doorbell_entry(regs);
ppc_msgsync(); ppc_msgsync();
...@@ -91,6 +93,7 @@ void doorbell_exception(struct pt_regs *regs) ...@@ -91,6 +93,7 @@ void doorbell_exception(struct pt_regs *regs)
smp_ipi_demux_relaxed(); /* already performed the barrier */ smp_ipi_demux_relaxed(); /* already performed the barrier */
trace_doorbell_exit(regs);
irq_exit(); irq_exit();
set_irq_regs(old_regs); set_irq_regs(old_regs);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment