Skip to contentSkip to conversation

cobalt/intr: Move IRQ exit trace point

PATCH Applied Jan Kiszka 2 participants 2 messages Jan 26, 2018 – Jan 27, 2018

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 cobalt/intr: Move IRQ exit trace point

It can be confusing for people reading a trace when a context switch due to a wake up in the IRQ handler comes before the handler was left. Move the exit instrumentation before the schedule, just like we already do in the clock handler.

---
 kernel/cobalt/intr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
kernel/cobalt/intr.c +4 -4
index 14dc0b35e..fb27a3295 100644
@@ -355,12 +355,12 @@ static void xnintr_vec_handler(unsigned int irq, void *cookie)
 out:
 	xnstat_exectime_switch(sched, prev);
 
+	trace_cobalt_irq_exit(irq);
+
 	if (--sched->inesting == 0) {
 		sched->lflags &= ~XNINIRQ;
 		xnsched_run();
 	}
-
-	trace_cobalt_irq_exit(irq);
 }
 
 /*
@@ -441,12 +441,12 @@ static void xnintr_edge_vec_handler(unsigned int irq, void *cookie)
 out:
 	xnstat_exectime_switch(sched, prev);
 
+	trace_cobalt_irq_exit(irq);
+
 	if (--sched->inesting == 0) {
 		sched->lflags &= ~XNINIRQ;
 		xnsched_run();
 	}
-
-	trace_cobalt_irq_exit(irq);
 }
 
 static inline int xnintr_irq_attach(struct xnintr *intr)
Signature · 1 line
2.13.6
#1 lore raw
Quoted 6 lines · Jan Kiszka

It can be confusing for people reading a trace when a context switch due to a wake up in the IRQ handler comes before the handler was left. Move the exit instrumentation before the schedule, just like we already do in the clock handler.

Merged, thanks.

Signature · 1 line
Philippe.