trace: irqsoff: fix irqs disabled tracking

Current tracking for irqs disabled is between calls of hardirqs_on
to hardirqs_off, it should be reverse.

fix the issue by correcting the tracking.

Change-Id: I84bbe7fb906a04cfa5f779fa111e2aef9844969a
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
tirimbino
Lingutla Chandrasekhar 7 years ago committed by Gerrit - the friendly Code Review server
parent 981424bd52
commit 41d5992842
  1. 24
      kernel/trace/trace_irqsoff.c

@ -491,14 +491,11 @@ static inline void tracer_hardirqs_on(void)
#ifdef CONFIG_PREEMPTIRQ_EVENTS
struct irqsoff_store *is = &per_cpu(the_irqsoff,
raw_smp_processor_id());
u64 delta = sched_clock() - is->ts;
if (!is->ts) {
is->ts = sched_clock();
is->caddr[0] = CALLER_ADDR0;
is->caddr[1] = CALLER_ADDR1;
is->caddr[2] = CALLER_ADDR2;
is->caddr[3] = CALLER_ADDR3;
}
if (delta > sysctl_irqsoff_tracing_threshold_ns)
trace_irqs_disable(delta, is->caddr[0], is->caddr[1],
is->caddr[2], is->caddr[3]);
#endif /* CONFIG_PREEMPTIRQ_EVENTS */
if (!preempt_trace() && irq_trace())
@ -510,15 +507,12 @@ static inline void tracer_hardirqs_off(void)
#ifdef CONFIG_PREEMPTIRQ_EVENTS
struct irqsoff_store *is = &per_cpu(the_irqsoff,
raw_smp_processor_id());
u64 delta = 0;
if (is->ts) {
delta = sched_clock() - is->ts;
is->ts = 0;
}
if (delta > sysctl_irqsoff_tracing_threshold_ns)
trace_irqs_disable(delta, is->caddr[0], is->caddr[1],
is->caddr[2], is->caddr[3]);
is->ts = sched_clock();
is->caddr[0] = CALLER_ADDR0;
is->caddr[1] = CALLER_ADDR1;
is->caddr[2] = CALLER_ADDR2;
is->caddr[3] = CALLER_ADDR3;
#endif /* CONFIG_PREEMPTIRQ_EVENTS */
if (!preempt_trace() && irq_trace())

Loading…
Cancel
Save