ftrace: restore iterator trace in pipe read
[deliverable/linux.git] / kernel / trace / trace.c
index 9197782d15c9dd4abc7b6ddd561d3a919fc69465..d141fc98f3a88867410d6a4cd2c8f9835596c0c7 100644 (file)
@@ -2202,6 +2202,8 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
 {
        struct trace_iterator *iter = filp->private_data;
        struct trace_array_cpu *data;
+       struct trace_array *tr = iter->tr;
+       struct tracer *tracer = iter->trace;
        static cpumask_t mask;
        static int start;
        unsigned long flags;
@@ -2231,8 +2233,6 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
        start = 0;
 
        while (trace_empty(iter)) {
-               if (!(trace_flags & TRACE_ITER_BLOCK))
-                       return -EWOULDBLOCK;
                /*
                 * This is a make-shift waitqueue. The reason we don't use
                 * an actual wait queue is because:
@@ -2276,7 +2276,8 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
                cnt = PAGE_SIZE - 1;
 
        memset(iter, 0, sizeof(*iter));
-       iter->tr = &global_trace;
+       iter->tr = tr;
+       iter->trace = tracer;
        iter->pos = -1;
 
        /*
This page took 0.024695 seconds and 5 git commands to generate.