aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-05-12 15:20:58 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 15:46:53 -0400
commitb5685aede3b7b65e72ddc73b951aa1f70798a614 (patch)
tree12d198a161c360ed900db504067a46c4662eb21a /kernel/trace
parent8487c23765b6e0444ec6b5f1530766d63fe68e35 (diff)
ftrace: restore iterator trace in pipe read
The trace iterator is reset in the read. We still need to restore the tracer that the trace_pipe was opened with. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index fd4ecc292005..d141fc98f3a8 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2202,6 +2202,8 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
2202{ 2202{
2203 struct trace_iterator *iter = filp->private_data; 2203 struct trace_iterator *iter = filp->private_data;
2204 struct trace_array_cpu *data; 2204 struct trace_array_cpu *data;
2205 struct trace_array *tr = iter->tr;
2206 struct tracer *tracer = iter->trace;
2205 static cpumask_t mask; 2207 static cpumask_t mask;
2206 static int start; 2208 static int start;
2207 unsigned long flags; 2209 unsigned long flags;
@@ -2274,7 +2276,8 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
2274 cnt = PAGE_SIZE - 1; 2276 cnt = PAGE_SIZE - 1;
2275 2277
2276 memset(iter, 0, sizeof(*iter)); 2278 memset(iter, 0, sizeof(*iter));
2277 iter->tr = &global_trace; 2279 iter->tr = tr;
2280 iter->trace = tracer;
2278 iter->pos = -1; 2281 iter->pos = -1;
2279 2282
2280 /* 2283 /*