lkml.org 
[lkml]   [2019]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/5] sched/tracing: Show stacktrace for wakeup tracers
Date
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.

Signed-off-by: Changbin Du <changbin.du@gmail.com>
---
kernel/trace/trace_sched_wakeup.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c
index da5b6e012840..0ec136d408ff 100644
--- a/kernel/trace/trace_sched_wakeup.c
+++ b/kernel/trace/trace_sched_wakeup.c
@@ -474,6 +474,8 @@ probe_wakeup_sched_switch(void *ignore, bool preempt,
data = per_cpu_ptr(wakeup_trace->trace_buffer.data, wakeup_cpu);

__trace_function(wakeup_trace, CALLER_ADDR0, CALLER_ADDR1, flags, pc);
+ /* Skip 2 functions to get to the task switch function */
+ __trace_stack(wakeup_trace, flags, 2, pc);
tracing_sched_switch_trace(wakeup_trace, prev, next, flags, pc);

T0 = data->preempt_timestamp;
@@ -593,6 +595,8 @@ probe_wakeup(void *ignore, struct task_struct *p)
* it should be safe to use it here.
*/
__trace_function(wakeup_trace, CALLER_ADDR1, CALLER_ADDR2, flags, pc);
+ /* Skip 2 functions to get to the task wakeup function */
+ __trace_stack(wakeup_trace, flags, 2, pc);

out_locked:
arch_spin_unlock(&wakeup_lock);
--
2.17.1
\
 
 \ /
  Last update: 2019-01-01 16:48    [W:0.105 / U:3.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site