powerpc: tracing: Add powerpc tracepoints for timer entry and exit
authorAnton Blanchard <anton@samba.org>
Mon, 26 Oct 2009 18:49:14 +0000 (18:49 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 28 Oct 2009 05:13:03 +0000 (16:13 +1100)
commit6795b85c6a4f690e61e7be31aa150d945c723fb5
tree2979f2fc5dcb2585e99774a0487b2b640a51adaa
parent1bf4af165050d90ea6659ffb2536ec8ca783aab5
powerpc: tracing: Add powerpc tracepoints for timer entry and exit

We can monitor the effectiveness of our power management of both the
kernel and hypervisor by probing the timer interrupt. For example, on
this box we see 10.37s timer interrupts on an idle core:

<idle>-0     [010]  3900.671297: timer_interrupt_entry: pt_regs=c0000000ce1e7b10
<idle>-0     [010]  3900.671302: timer_interrupt_exit: pt_regs=c0000000ce1e7b10

<idle>-0     [010]  3911.042963: timer_interrupt_entry: pt_regs=c0000000ce1e7b10
<idle>-0     [010]  3911.042968: timer_interrupt_exit: pt_regs=c0000000ce1e7b10

<idle>-0     [010]  3921.414630: timer_interrupt_entry: pt_regs=c0000000ce1e7b10
<idle>-0     [010]  3921.414635: timer_interrupt_exit: pt_regs=c0000000ce1e7b10

Since we have a 207MHz decrementer it will go negative and fire every 10.37s
even if Linux is completely idle.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/include/asm/trace.h
arch/powerpc/kernel/time.c