public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] tracing/ksym_tracer: fix the output of ksym tracer
@ 2009-07-22  3:21 Xiao Guangrong
  2009-07-22  3:23 ` [PATCH 2/3] tracing/ksym_tracer: fix write operation of ksym_trace_filter Xiao Guangrong
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Xiao Guangrong @ 2009-07-22  3:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.Prasad, Alan Stern, Frederic Weisbecker, Steven Rostedt, LKML

Fix the output format of ksym tracer, make it properly aligned

Befor patch:
# tracer: ksym_tracer
#
#       TASK-PID      CPU#      Symbol         Type    Function         
#          |           |          |              |         |            
bash            1378  1   ksym_tracer_mutex     W  mutex_lock+0x11/0x27
bash            1378  1   ksym_filter_head      W  process_new_ksym_entry+0xd2/0x10c
bash            1378  1   ksym_tracer_mutex     W  mutex_unlock+0x12/0x1b
cat             1429  0   ksym_tracer_mutex     W  mutex_lock+0x11/0x27

After patch:
# tracer: ksym_tracer
#
#       TASK-PID   CPU#      Symbol                    Type    Function
#          |        |          |                        |         |
        cat-1423  [000] ksym_tracer_mutex               RW mutex_lock+0x11/0x27
        cat-1423  [000] ksym_filter_head                RW ksym_trace_filter_read+0x6e/0x10d
        cat-1423  [000] ksym_tracer_mutex               RW mutex_unlock+0x12/0x1b
        cat-1423  [000] ksym_tracer_mutex               RW mutex_lock+0x11/0x27
        cat-1423  [000] ksym_filter_head                RW ksym_trace_filter_read+0x6e/0x10d
        cat-1423  [000] ksym_tracer_mutex               RW mutex_unlock+0x12/0x1b

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
 kernel/trace/trace_ksym.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c
index 1256a6e..fbf3a8e 100644
--- a/kernel/trace/trace_ksym.c
+++ b/kernel/trace/trace_ksym.c
@@ -370,13 +370,12 @@ static int ksym_trace_init(struct trace_array *tr)
 
 static void ksym_trace_print_header(struct seq_file *m)
 {
-
 	seq_puts(m,
-		 "#       TASK-PID      CPU#      Symbol         Type    "
-		 "Function         \n");
+		 "#       TASK-PID   CPU#      Symbol                    "
+		 "Type    Function\n");
 	seq_puts(m,
-		 "#          |           |          |              |         "
-		 "|            \n");
+		 "#          |        |          |                       "
+		 " |         |\n");
 }
 
 static enum print_line_t ksym_trace_output(struct trace_iterator *iter)
@@ -392,7 +391,7 @@ static enum print_line_t ksym_trace_output(struct trace_iterator *iter)
 
 	trace_assign_type(field, entry);
 
-	ret = trace_seq_printf(s, "%-15s %-5d %-3d %-20s ", field->cmd,
+	ret = trace_seq_printf(s, "%11s-%-5d [%03d] %-30s ", field->cmd,
 				entry->pid, iter->cpu, field->ksym_name);
 	if (!ret)
 		return TRACE_TYPE_PARTIAL_LINE;
@@ -412,7 +411,7 @@ static enum print_line_t ksym_trace_output(struct trace_iterator *iter)
 		return TRACE_TYPE_PARTIAL_LINE;
 
 	sprint_symbol(str, field->ip);
-	ret = trace_seq_printf(s, "%-20s\n", str);
+	ret = trace_seq_printf(s, "%s\n", str);
 	if (!ret)
 		return TRACE_TYPE_PARTIAL_LINE;
 
-- 
1.6.1.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [PATCH 0/3] [GIT PULL] tracing/ksys_tracer: misc fixes
@ 2009-07-24  2:14 Steven Rostedt
  2009-07-24  2:14 ` [PATCH 3/3] tracing/ksym_tracer: support quick clear for ksym_trace_filter -- v2 Steven Rostedt
  0 siblings, 1 reply; 15+ messages in thread
From: Steven Rostedt @ 2009-07-24  2:14 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Thomas Gleixner,
	K.Prasad, Xiao Guangrong, Alan Stern


Ingo,

Please pull the latest tip/tracing/hw-breakpoints tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/hw-breakpoints


Xiao Guangrong (3):
      tracing/ksym_tracer: fix the output of ksym tracer
      tracing/ksym_tracer: fix write operation of ksym_trace_filter
      tracing/ksym_tracer: support quick clear for ksym_trace_filter -- v2

----
 kernel/trace/trace_ksym.c |   70 +++++++++++++++++++++++++++++----------------
 1 files changed, 45 insertions(+), 25 deletions(-)
-- 

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-11-21 13:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-22  3:21 [PATCH 1/3] tracing/ksym_tracer: fix the output of ksym tracer Xiao Guangrong
2009-07-22  3:23 ` [PATCH 2/3] tracing/ksym_tracer: fix write operation of ksym_trace_filter Xiao Guangrong
2009-11-21 13:35   ` [tip:perf/core] " tip-bot for Xiao Guangrong
2009-07-22  3:25 ` [PATCH 3/3] tracing/ksym_tracer: support quick clear for ksym_trace_filter Xiao Guangrong
2009-07-22  5:06   ` K.Prasad
2009-07-22  9:56     ` Xiao Guangrong
2009-07-22 15:17       ` K.Prasad
2009-07-23  0:50         ` Xiao Guangrong
2009-07-23  4:01   ` [PATCH 3/3] tracing/ksym_tracer: support quick clear for ksym_trace_filter -- v2 Xiao Guangrong
2009-07-24  0:46     ` Steven Rostedt
2009-07-24  2:06       ` Xiao Guangrong
2009-07-24  2:11         ` Steven Rostedt
2009-11-21 13:35     ` [tip:perf/core] " tip-bot for Xiao Guangrong
2009-11-21 13:35 ` [tip:perf/core] tracing/ksym_tracer: fix the output of ksym tracer tip-bot for Xiao Guangrong
  -- strict thread matches above, loose matches on Subject: below --
2009-07-24  2:14 [PATCH 0/3] [GIT PULL] tracing/ksys_tracer: misc fixes Steven Rostedt
2009-07-24  2:14 ` [PATCH 3/3] tracing/ksym_tracer: support quick clear for ksym_trace_filter -- v2 Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox