Skip to content

Commit f56e7f8

Browse files
Jiri Olsarostedt
authored andcommitted
tracing, function: Fix trace header to follow context-info option
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>
1 parent ffeb80f commit f56e7f8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎kernel/trace/trace.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,6 +2053,9 @@ void trace_default_header(struct seq_file *m)
20532053
{
20542054
struct trace_iterator *iter = m->private;
20552055

2056+
if (!(trace_flags & TRACE_ITER_CONTEXT_INFO))
2057+
return;
2058+
20562059
if (iter->iter_flags & TRACE_FILE_LAT_FMT) {
20572060
/* print nothing if the buffers are empty */
20582061
if (trace_empty(iter))

0 commit comments

Comments
 (0)