mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: rostedt@goodmis.org, fweisbec@gmail.com, mingo@redhat.com
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCHv2 3/5] tracing, function: Fix trace header to follow context-info option
Date: Fri,  3 Jun 2011 16:58:49 +0200	[thread overview]
Message-ID: <1307113131-10045-4-git-send-email-jolsa@redhat.com> (raw)
In-Reply-To: <1307113131-10045-1-git-send-email-jolsa@redhat.com>

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>
---
 kernel/trace/trace.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ee9c921..01fc8d7 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2051,6 +2051,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))
-- 
1.7.1


  parent reply	other threads:[~2011-06-03 14:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 14:19 [PATCH 0/5] tracing, function, graph: Fixies for field display Jiri Olsa
2011-06-03 14:19 ` [PATCH 1/5] tracing, function_graph: Remove dependency of abstime and duration fields on latency Jiri Olsa
2011-06-03 14:20 ` [PATCH 2/5] tracing, function_graph: Merge overhead and duration display functions Jiri Olsa
2011-06-03 14:20 ` [PATCH 3/5] tracing, function: Fix trace header to follow context-info option Jiri Olsa
2011-06-03 14:20 ` [PATCH 4/5] tracing, function_graph: Remove lock-depth from latency trace Jiri Olsa
2011-06-03 14:20 ` [PATCH 5/5] tracing, function_graph: Add context-info support for function_graph tracer Jiri Olsa
2011-06-03 14:26 ` [PATCH 0/5] tracing, function, graph: Fixies for field display Steven Rostedt
2011-06-03 14:53   ` Jiri Olsa
2011-06-03 14:58   ` [PATCHv2 " Jiri Olsa
2011-06-03 14:58     ` [PATCHv2 1/5] tracing, function_graph: Remove dependency of abstime and duration fields on latency Jiri Olsa
2011-06-03 15:02       ` Steven Rostedt
2011-07-05 12:51       ` [tip:perf/core] " tip-bot for Jiri Olsa
2011-06-03 14:58     ` [PATCHv2 2/5] tracing, function_graph: Merge overhead and duration display functions Jiri Olsa
2011-07-05 12:52       ` [tip:perf/core] " tip-bot for Jiri Olsa
2011-06-03 14:58     ` Jiri Olsa [this message]
2011-07-05 12:52       ` [tip:perf/core] tracing, function: Fix trace header to follow context-info option tip-bot for Jiri Olsa
2011-06-03 14:58     ` [PATCHv2 4/5] tracing, function_graph: Remove lock-depth from latency trace Jiri Olsa
2011-07-05 12:52       ` [tip:perf/core] " tip-bot for Jiri Olsa
2011-06-03 14:58     ` [PATCHv2 5/5] tracing, function_graph: Add context-info support for function_graph tracer Jiri Olsa
2011-07-05 12:53       ` [tip:perf/core] " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307113131-10045-4-git-send-email-jolsa@redhat.com \
    --to=jolsa@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome