Skip to content

Commit

Permalink
tracing: Show stacktrace for wakeup tracers
Browse files Browse the repository at this point in the history
This align the behavior of wakeup tracers with irqsoff latency tracer
that we record stacktrace at the beginning and end of waking up. The
stacktrace shows us what is happening in the kernel.

Link: http://lkml.kernel.org/r/20190116160249.7554-1-changbin.du@gmail.com

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Changbin Du authored and Steven Rostedt (VMware) committed Feb 6, 2019
1 parent 88d380e commit f52d569
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/trace/trace_sched_wakeup.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ probe_wakeup_sched_switch(void *ignore, bool preempt,

__trace_function(wakeup_trace, CALLER_ADDR0, CALLER_ADDR1, flags, pc);
tracing_sched_switch_trace(wakeup_trace, prev, next, flags, pc);
__trace_stack(wakeup_trace, flags, 0, pc);

T0 = data->preempt_timestamp;
T1 = ftrace_now(cpu);
Expand Down Expand Up @@ -586,6 +587,7 @@ probe_wakeup(void *ignore, struct task_struct *p)
data = per_cpu_ptr(wakeup_trace->trace_buffer.data, wakeup_cpu);
data->preempt_timestamp = ftrace_now(cpu);
tracing_sched_wakeup_trace(wakeup_trace, p, current, flags, pc);
__trace_stack(wakeup_trace, flags, 0, pc);

/*
* We must be careful in using CALLER_ADDR2. But since wake_up
Expand Down

0 comments on commit f52d569

Please sign in to comment.