aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8b9ba41ec146..756d7283318b 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2201,15 +2201,20 @@ __tracing_open(struct inode *inode, struct file *file)
2201 2201
2202 if (iter->cpu_file == TRACE_PIPE_ALL_CPU) { 2202 if (iter->cpu_file == TRACE_PIPE_ALL_CPU) {
2203 for_each_tracing_cpu(cpu) { 2203 for_each_tracing_cpu(cpu) {
2204
2205 iter->buffer_iter[cpu] = 2204 iter->buffer_iter[cpu] =
2206 ring_buffer_read_start(iter->tr->buffer, cpu); 2205 ring_buffer_read_prepare(iter->tr->buffer, cpu);
2206 }
2207 ring_buffer_read_prepare_sync();
2208 for_each_tracing_cpu(cpu) {
2209 ring_buffer_read_start(iter->buffer_iter[cpu]);
2207 tracing_iter_reset(iter, cpu); 2210 tracing_iter_reset(iter, cpu);
2208 } 2211 }
2209 } else { 2212 } else {
2210 cpu = iter->cpu_file; 2213 cpu = iter->cpu_file;
2211 iter->buffer_iter[cpu] = 2214 iter->buffer_iter[cpu] =
2212 ring_buffer_read_start(iter->tr->buffer, cpu); 2215 ring_buffer_read_prepare(iter->tr->buffer, cpu);
2216 ring_buffer_read_prepare_sync();
2217 ring_buffer_read_start(iter->buffer_iter[cpu]);
2213 tracing_iter_reset(iter, cpu); 2218 tracing_iter_reset(iter, cpu);
2214 } 2219 }
2215 2220