[PATCH 1/6] ftrace: give time for wakeup test to run

Previous thread: [PATCH 0/6] ftrace: port to the new ring_buffer by Steven Rostedt on Monday, September 29, 2008 - 8:02 pm. (7 messages)

Next thread: [PATCH 2/6] Unified trace buffer by Steven Rostedt on Monday, September 29, 2008 - 8:02 pm. (4 messages)
From: Steven Rostedt
Date: Monday, September 29, 2008 - 8:02 pm

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);

-- 
--

Previous thread: [PATCH 0/6] ftrace: port to the new ring_buffer by Steven Rostedt on Monday, September 29, 2008 - 8:02 pm. (7 messages)

Next thread: [PATCH 2/6] Unified trace buffer by Steven Rostedt on Monday, September 29, 2008 - 8:02 pm. (4 messages)