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, 7 insertions, 4 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index a45b59e53fbc..8df8fdd69c95 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2298,7 +2298,9 @@ static int s_show(struct seq_file *m, void *v)
2298 seq_printf(m, "# tracer: %s\n", iter->trace->name); 2298 seq_printf(m, "# tracer: %s\n", iter->trace->name);
2299 seq_puts(m, "#\n"); 2299 seq_puts(m, "#\n");
2300 } 2300 }
2301 if (iter->iter_flags & TRACE_FILE_LAT_FMT) { 2301 if (iter->trace && iter->trace->print_header)
2302 iter->trace->print_header(m);
2303 else if (iter->iter_flags & TRACE_FILE_LAT_FMT) {
2302 /* print nothing if the buffers are empty */ 2304 /* print nothing if the buffers are empty */
2303 if (trace_empty(iter)) 2305 if (trace_empty(iter))
2304 return 0; 2306 return 0;
@@ -2350,6 +2352,10 @@ __tracing_open(struct inode *inode, struct file *file, int *ret)
2350 iter->trace = current_trace; 2352 iter->trace = current_trace;
2351 iter->pos = -1; 2353 iter->pos = -1;
2352 2354
2355 /* Notify the tracer early; before we stop tracing. */
2356 if (iter->trace && iter->trace->open)
2357 iter->trace->open(iter);
2358
2353 /* Annotate start of buffers if we had overruns */ 2359 /* Annotate start of buffers if we had overruns */
2354 if (ring_buffer_overruns(iter->tr->buffer)) 2360 if (ring_buffer_overruns(iter->tr->buffer))
2355 iter->iter_flags |= TRACE_FILE_ANNOTATE; 2361 iter->iter_flags |= TRACE_FILE_ANNOTATE;
@@ -2375,9 +2381,6 @@ __tracing_open(struct inode *inode, struct file *file, int *ret)
2375 /* stop the trace while dumping */ 2381 /* stop the trace while dumping */
2376 tracing_stop(); 2382 tracing_stop();
2377 2383
2378 if (iter->trace && iter->trace->open)
2379 iter->trace->open(iter);
2380
2381 mutex_unlock(&trace_types_lock); 2384 mutex_unlock(&trace_types_lock);
2382 2385
2383 out: 2386 out: