diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-07-07 01:55:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-07-10 05:59:44 -0400 |
commit | 9d7e934408b52cd53dd85270eb36941a6a318cc5 (patch) | |
tree | bc018aa15bbacbd3621300a5cb0fecf0a1c46d52 /kernel/trace/trace_ksym.c | |
parent | 558df6c8f74ac4a0b9026ef85b0028280f364d96 (diff) |
ksym_tracer: Fix the output of stat tracing
- make ksym_tracer_stat_start() return head->first instead of
&head->first
- make the output properly aligned
Before:
Access type Symbol Counter
NA <NA> 0
RW pid_max 0
After:
Access Type Symbol Counter
----------- ------ -------
RW pid_max 0
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: "K.Prasad" <prasad@linux.vnet.ibm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <4A52E346.5050608@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_ksym.c')
-rw-r--r-- | kernel/trace/trace_ksym.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c index 7d349d34a0d1..1256a6e8ee24 100644 --- a/kernel/trace/trace_ksym.c +++ b/kernel/trace/trace_ksym.c | |||
@@ -453,8 +453,10 @@ device_initcall(init_ksym_trace); | |||
453 | #ifdef CONFIG_PROFILE_KSYM_TRACER | 453 | #ifdef CONFIG_PROFILE_KSYM_TRACER |
454 | static int ksym_tracer_stat_headers(struct seq_file *m) | 454 | static int ksym_tracer_stat_headers(struct seq_file *m) |
455 | { | 455 | { |
456 | seq_printf(m, " Access type "); | 456 | seq_puts(m, " Access Type "); |
457 | seq_printf(m, " Symbol Counter \n"); | 457 | seq_puts(m, " Symbol Counter\n"); |
458 | seq_puts(m, " ----------- "); | ||
459 | seq_puts(m, " ------ -------\n"); | ||
458 | return 0; | 460 | return 0; |
459 | } | 461 | } |
460 | 462 | ||
@@ -472,27 +474,27 @@ static int ksym_tracer_stat_show(struct seq_file *m, void *v) | |||
472 | 474 | ||
473 | switch (access_type) { | 475 | switch (access_type) { |
474 | case HW_BREAKPOINT_WRITE: | 476 | case HW_BREAKPOINT_WRITE: |
475 | seq_printf(m, " W "); | 477 | seq_puts(m, " W "); |
476 | break; | 478 | break; |
477 | case HW_BREAKPOINT_RW: | 479 | case HW_BREAKPOINT_RW: |
478 | seq_printf(m, " RW "); | 480 | seq_puts(m, " RW "); |
479 | break; | 481 | break; |
480 | default: | 482 | default: |
481 | seq_printf(m, " NA "); | 483 | seq_puts(m, " NA "); |
482 | } | 484 | } |
483 | 485 | ||
484 | if (lookup_symbol_name(entry->ksym_addr, fn_name) >= 0) | 486 | if (lookup_symbol_name(entry->ksym_addr, fn_name) >= 0) |
485 | seq_printf(m, " %s ", fn_name); | 487 | seq_printf(m, " %-36s", fn_name); |
486 | else | 488 | else |
487 | seq_printf(m, " <NA> "); | 489 | seq_printf(m, " %-36s", "<NA>"); |
490 | seq_printf(m, " %15lu\n", entry->counter); | ||
488 | 491 | ||
489 | seq_printf(m, "%15lu\n", entry->counter); | ||
490 | return 0; | 492 | return 0; |
491 | } | 493 | } |
492 | 494 | ||
493 | static void *ksym_tracer_stat_start(struct tracer_stat *trace) | 495 | static void *ksym_tracer_stat_start(struct tracer_stat *trace) |
494 | { | 496 | { |
495 | return &(ksym_filter_head.first); | 497 | return ksym_filter_head.first; |
496 | } | 498 | } |
497 | 499 | ||
498 | static void * | 500 | static void * |