diff options
Diffstat (limited to 'kernel/trace/trace_sched_wakeup.c')
-rw-r--r-- | kernel/trace/trace_sched_wakeup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c index 6e1529bc6172..26185d727676 100644 --- a/kernel/trace/trace_sched_wakeup.c +++ b/kernel/trace/trace_sched_wakeup.c | |||
@@ -162,8 +162,10 @@ probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev, | |||
162 | if (!report_latency(delta)) | 162 | if (!report_latency(delta)) |
163 | goto out_unlock; | 163 | goto out_unlock; |
164 | 164 | ||
165 | tracing_max_latency = delta; | 165 | if (likely(!is_tracing_stopped())) { |
166 | update_max_tr(wakeup_trace, wakeup_task, wakeup_cpu); | 166 | tracing_max_latency = delta; |
167 | update_max_tr(wakeup_trace, wakeup_task, wakeup_cpu); | ||
168 | } | ||
167 | 169 | ||
168 | out_unlock: | 170 | out_unlock: |
169 | __wakeup_reset(wakeup_trace); | 171 | __wakeup_reset(wakeup_trace); |