From: Nicholas Piggin <npiggin@gmail.com>
To: Anton Blanchard <anton@ozlabs.org>
Cc: paulus@samba.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: Add doorbell tracepoints
Date: Wed, 3 Oct 2018 13:48:36 +1000 [thread overview]
Message-ID: <20181003134836.0dd85200@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20181003002957.7711-1-anton@ozlabs.org>
On Wed, 3 Oct 2018 10:29:57 +1000
Anton Blanchard <anton@ozlabs.org> wrote:
> When analysing sources of OS jitter, I noticed that doorbells cannot be
> traced.
>
> Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> arch/powerpc/include/asm/trace.h | 16 ++++++++++++++++
> arch/powerpc/kernel/dbell.c | 3 +++
> 2 files changed, 19 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/trace.h b/arch/powerpc/include/asm/trace.h
> index d018e8602694..eb9aa0f1561e 100644
> --- a/arch/powerpc/include/asm/trace.h
> +++ b/arch/powerpc/include/asm/trace.h
> @@ -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_exception_entry,
> +
> + TP_PROTO(struct pt_regs *regs),
> +
> + TP_ARGS(regs)
> +);
> +
> +DEFINE_EVENT(ppc64_interrupt_class, doorbell_exception_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);
> diff --git a/arch/powerpc/kernel/dbell.c b/arch/powerpc/kernel/dbell.c
> index b6fe883b1016..5ec3b3835925 100644
> --- a/arch/powerpc/kernel/dbell.c
> +++ b/arch/powerpc/kernel/dbell.c
> @@ -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);
> }
> --
> 2.17.1
>
next prev parent reply other threads:[~2018-10-03 3:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 0:29 [PATCH] powerpc: Add doorbell tracepoints Anton Blanchard
2018-10-03 3:48 ` Nicholas Piggin [this message]
2018-10-04 5:41 ` Russell Currey
2018-10-04 6:16 ` Anton Blanchard
-- strict thread matches above, loose matches on Subject: below --
2018-10-04 6:23 Anton Blanchard
2019-05-03 6:59 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181003134836.0dd85200@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=anton@ozlabs.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).