lkml.org 
[lkml]   [2008]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/6] ftrace: give time for wakeup test to run
It is possible that the testing thread in the ftrace wakeup test does not
run before we stop the trace. This will cause the trace to fail since nothing
will be in the buffers.

This patch adds a small wait in the wakeup test to allow for the woken task
to run and be traced.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/trace/trace_selftest.c | 3 +++
1 file changed, 3 insertions(+)

Index: linux-tip.git/kernel/trace/trace_selftest.c
===================================================================
--- linux-tip.git.orig/kernel/trace/trace_selftest.c 2008-09-29 20:13:37.000000000 -0400
+++ linux-tip.git/kernel/trace/trace_selftest.c 2008-09-29 20:14:30.000000000 -0400
@@ -498,6 +498,9 @@ trace_selftest_startup_wakeup(struct tra

wake_up_process(p);

+ /* give a little time to let the thread wake up */
+ msleep(100);
+
/* stop the tracing. */
tr->ctrl = 0;
trace->ctrl_update(tr);
--


\
 
 \ /
  Last update: 2008-09-30 05:11    [W:0.547 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site