tracing, function: Fix trace header to follow context-info option
authorJiri Olsa <jolsa@redhat.com>
Fri, 3 Jun 2011 14:58:49 +0000 (16:58 +0200)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 15 Jun 2011 02:48:48 +0000 (22:48 -0400)
The header display of function tracer does not follow
the context-info option, so field names are displayed even
if this option is off.

Added check for TRACE_ITER_CONTEXT_INFO trace_flags.

With following commands:
# echo function > ./current_tracer
# echo 0 > options/context-info
# cat trace

This is what it looked like before:
# tracer: function
#
#           TASK-PID    CPU#    TIMESTAMP  FUNCTION
#              | |       |          |         |
add_preempt_count <-schedule
rcu_note_context_switch <-schedule
...

This is what it looks like now:
# tracer: function
#
_raw_spin_unlock_irqrestore <-hrtimer_try_to_cancel
...

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1307113131-10045-4-git-send-email-jolsa@redhat.com
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c

index 42fdf3adff319b4cb5e2ec2dc9e8dddb792d8cbf..cf22b4bf9896521c1854cf3632bacbdc64fcc5cd 100644 (file)
@@ -2053,6 +2053,9 @@ void trace_default_header(struct seq_file *m)
 {
        struct trace_iterator *iter = m->private;
 
+       if (!(trace_flags & TRACE_ITER_CONTEXT_INFO))
+               return;
+
        if (iter->iter_flags & TRACE_FILE_LAT_FMT) {
                /* print nothing if the buffers are empty */
                if (trace_empty(iter))
This page took 0.02936 seconds and 5 git commands to generate.