Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121197
b: refs/heads/master
c: 8bba1bf
h: refs/heads/master
i:
  121195: b762cf4
v: v3
  • Loading branch information
Markus Metzger authored and Ingo Molnar committed Nov 25, 2008
1 parent 5ebf8f2 commit 8a6128b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6abb11aecd888d1da6276399380b7355f127c006
refs/heads/master: 8bba1bf5e2434c83f2fe8b1422604ace9bbe4cb8
11 changes: 7 additions & 4 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2298,7 +2298,9 @@ static int s_show(struct seq_file *m, void *v)
seq_printf(m, "# tracer: %s\n", iter->trace->name);
seq_puts(m, "#\n");
}
if (iter->iter_flags & TRACE_FILE_LAT_FMT) {
if (iter->trace && iter->trace->print_header)
iter->trace->print_header(m);
else if (iter->iter_flags & TRACE_FILE_LAT_FMT) {
/* print nothing if the buffers are empty */
if (trace_empty(iter))
return 0;
Expand Down Expand Up @@ -2350,6 +2352,10 @@ __tracing_open(struct inode *inode, struct file *file, int *ret)
iter->trace = current_trace;
iter->pos = -1;

/* Notify the tracer early; before we stop tracing. */
if (iter->trace && iter->trace->open)
iter->trace->open(iter);

/* Annotate start of buffers if we had overruns */
if (ring_buffer_overruns(iter->tr->buffer))
iter->iter_flags |= TRACE_FILE_ANNOTATE;
Expand All @@ -2375,9 +2381,6 @@ __tracing_open(struct inode *inode, struct file *file, int *ret)
/* stop the trace while dumping */
tracing_stop();

if (iter->trace && iter->trace->open)
iter->trace->open(iter);

mutex_unlock(&trace_types_lock);

out:
Expand Down
1 change: 1 addition & 0 deletions trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ struct tracer {
int (*selftest)(struct tracer *trace,
struct trace_array *tr);
#endif
void (*print_header)(struct seq_file *m);
enum print_line_t (*print_line)(struct trace_iterator *iter);
/* If you handled the flag setting, return 0 */
int (*set_flag)(u32 old_flags, u32 bit, int set);
Expand Down

0 comments on commit 8a6128b

Please sign in to comment.