From: Vaibhav Nagarnaik <vnagarnaik@google.com>
To: Frederic Weisbecker <fweisbec@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Steven Rostedt <rostedt@goodmis.org>
Cc: Michael Rubin <mrubin@google.com>,
David Sharp <dhsharp@google.com>,
linux-kernel@vger.kernel.org, x86@kernel.org,
Vaibhav Nagarnaik <vnagarnaik@google.com>
Subject: [PATCH 1/2] trace,x86: Add tracepoint to x86 timer interrupt handler
Date: Fri, 29 Jul 2011 16:59:37 -0700 [thread overview]
Message-ID: <1311983978-10350-2-git-send-email-vnagarnaik@google.com> (raw)
In-Reply-To: <1311983978-10350-1-git-send-email-vnagarnaik@google.com>
The x86 timer interrupt handler is the only handler not traced in the
irq/irq_handler_{entry|exit} trace events.
Add tracepoints to the interrupt handler to trace it.
Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
---
arch/x86/kernel/time.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
index 5a64d05..74d2280 100644
--- a/arch/x86/kernel/time.c
+++ b/arch/x86/kernel/time.c
@@ -51,6 +51,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
*/
@@ -59,7 +66,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)
@@ -68,12 +77,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);
--
1.7.3.1
next prev parent reply other threads:[~2011-07-30 0:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-29 23:59 [PATCH 0/2] Add tracepoints to trace all x86 system IRQs Vaibhav Nagarnaik
2011-07-29 23:59 ` Vaibhav Nagarnaik [this message]
2011-09-21 9:01 ` [PATCH 1/2] trace,x86: Add tracepoint to x86 timer interrupt handler Thomas Gleixner
2011-09-21 18:20 ` Vaibhav Nagarnaik
2011-07-29 23:59 ` [PATCH 2/2] trace,x86: Add x86 irq vector entry/exit tracepoints Vaibhav Nagarnaik
2011-12-12 21:52 ` Seiji Aguchi
2011-12-13 19:26 ` Frederic Weisbecker
2011-12-14 8:18 ` Ingo Molnar
2011-12-14 14:47 ` Frederic Weisbecker
2011-12-14 16:19 ` Vaibhav Nagarnaik
2011-12-14 15:09 ` Seiji Aguchi
2011-12-14 16:34 ` Frederic Weisbecker
2011-12-14 16:37 ` Steven Rostedt
2011-12-14 17:46 ` Seiji Aguchi
2011-12-14 18:09 ` Steven Rostedt
2011-12-15 2:23 ` Seiji Aguchi
2012-02-03 15:40 ` Steven Rostedt
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=1311983978-10350-2-git-send-email-vnagarnaik@google.com \
--to=vnagarnaik@google.com \
--cc=a.p.zijlstra@chello.nl \
--cc=dhsharp@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mrubin@google.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®