mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] trace,x86: Add external_interrupts to the irq_vectors class
@ 2018-09-17  8:48 Daniel Bristot de Oliveira
  2018-09-17  8:48 ` [PATCH 2/2] trace,x86: Add nmi " Daniel Bristot de Oliveira
  2018-09-17 10:24 ` [PATCH 1/2] trace,x86: Add external_interrupts " kbuild test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Bristot de Oliveira @ 2018-09-17  8:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: Daniel Bristot de Oliveira, Thomas Gleixner, Ingo Molnar,
	Peter Zijlstra, Steven Rostedt, Andy Lutomirski, Clark Williams,
	x86

Currently, the irq_vectors is showing the entry and exit events for
the interrupts of the architecture, but not for external interrupts.
This patch adds the tracepoints for external interrupts.

Example of output:
 <idle>-0     [000] d.h.   102.890935: external_interrupt_entry: vector=35
 <idle>-0     [000] d.h.   102.890960: external_interrupt_exit: vector=35

Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Clark Williams <williams@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: x86@kernel.org
---
 arch/x86/include/asm/trace/irq_vectors.h | 6 ++++++
 arch/x86/kernel/irq.c                    | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/arch/x86/include/asm/trace/irq_vectors.h b/arch/x86/include/asm/trace/irq_vectors.h
index 0af81b590a0c..bc9669df97c9 100644
--- a/arch/x86/include/asm/trace/irq_vectors.h
+++ b/arch/x86/include/asm/trace/irq_vectors.h
@@ -138,6 +138,12 @@ DEFINE_IRQ_VECTOR_EVENT(deferred_error_apic);
 DEFINE_IRQ_VECTOR_EVENT(thermal_apic);
 #endif
 
+/*
+ * external_interrupt - called when entering/exiting from regular device
+ * interrupt vector handler.
+ */
+DEFINE_IRQ_VECTOR_EVENT(external_interrupt);
+
 TRACE_EVENT(vector_config,
 
 	TP_PROTO(unsigned int irq, unsigned int vector,
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 59b5f2ea7c2f..715afe3a4f24 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -237,6 +237,7 @@ __visible unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
 	unsigned vector = ~regs->orig_ax;
 
 	entering_irq();
+	trace_external_interrupt_entry(vector);
 
 	/* entering_irq() tells RCU that we're not quiescent.  Check it. */
 	RCU_LOCKDEP_WARN(!rcu_is_watching(), "IRQ failed to wake up RCU");
@@ -255,6 +256,7 @@ __visible unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
 		}
 	}
 
+	trace_external_interrupt_exit(vector);
 	exiting_irq();
 
 	set_irq_regs(old_regs);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-17 10:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17  8:48 [PATCH 1/2] trace,x86: Add external_interrupts to the irq_vectors class Daniel Bristot de Oliveira
2018-09-17  8:48 ` [PATCH 2/2] trace,x86: Add nmi " Daniel Bristot de Oliveira
2018-09-17 10:18   ` kbuild test robot
2018-09-17 10:24 ` [PATCH 1/2] trace,x86: Add external_interrupts " kbuild test robot

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®