]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
The x86 timer interrupt handler is the only handler not traced in the
authorVaibhav Nagarnaik <vnagarnaik@google.com>
Wed, 24 Aug 2011 23:46:17 +0000 (09:46 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 23 Sep 2011 05:15:03 +0000 (15:15 +1000)
irq/irq_handler_{entry|exit} trace events.

Add tracepoints to the interrupt handler to trace it.

Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Michael Rubin <mrubin@google.com>
Cc: David Sharp <dhsharp@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kernel/time.c

index dd5fbf4101fc393a3edad3bb3a569a1ed63269fa..25046df137f24653e810ed63220482106a965ad4 100644 (file)
@@ -52,6 +52,13 @@ unsigned long profile_pc(struct pt_regs *regs)
 }
 EXPORT_SYMBOL(profile_pc);
 
+static irqreturn_t timer_interrupt(int irq, void *dev_id);
+static struct irqaction irq0  = {
+       .handler = timer_interrupt,
+       .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER,
+       .name = "timer"
+};
+
 /*
  * Default timer interrupt handler for PIT/HPET
  */
@@ -60,7 +67,9 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
        /* Keep nmi watchdog up to date */
        inc_irq_stat(irq0_irqs);
 
+       trace_irq_handler_entry(irq, &irq0);
        global_clock_event->event_handler(global_clock_event);
+       trace_irq_handler_exit(irq, &irq0, 1);
 
        /* MCA bus quirk: Acknowledge irq0 by setting bit 7 in port 0x61 */
        if (MCA_bus)
@@ -69,12 +78,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static struct irqaction irq0  = {
-       .handler = timer_interrupt,
-       .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER,
-       .name = "timer"
-};
-
 void __init setup_default_timer_irq(void)
 {
        setup_irq(0, &irq0);