mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
tracing: do not update tracing_max_latency when tracer is stopped
The state of the function pair tracing_stop()/tracing_start() is correctly considered when tracer data are updated. However, the global and externally accessible variable tracing_max_latency is always updated - even when tracing is stopped. The update should only occur, if tracing was not stopped. Signed-off-by: Carsten Emde <C.Emde@osadl.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
41dfba4367
commit
b5130b1e7d
4 changed files with 14 additions and 4 deletions
|
@ -162,8 +162,10 @@ probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev,
|
|||
if (!report_latency(delta))
|
||||
goto out_unlock;
|
||||
|
||||
tracing_max_latency = delta;
|
||||
update_max_tr(wakeup_trace, wakeup_task, wakeup_cpu);
|
||||
if (likely(!is_tracing_stopped())) {
|
||||
tracing_max_latency = delta;
|
||||
update_max_tr(wakeup_trace, wakeup_task, wakeup_cpu);
|
||||
}
|
||||
|
||||
out_unlock:
|
||||
__wakeup_reset(wakeup_trace);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue