diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-05 08:13:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-05 08:13:18 -0400 |
commit | 8edd4286f99f78fe07fe9196e69d5643da86cada (patch) | |
tree | 1a61df71db834138f94af06902ab342ed690cc4c | |
parent | fc54db5105d01ad691a7d747064c7890e17f936c (diff) |
perf report: Display user/kernel differentiator
Before:
25.96% copy_user_generic_string
15.23% two_op
15.19% one_op
6.92% enough_duration
1.23% alloc_pages_current
1.14% acpi_os_read_port
1.08% _spin_lock
After:
25.96% [k] copy_user_generic_string
15.23% [.] two_op
15.19% [.] one_op
6.92% [.] enough_duration
1.23% [k] alloc_pages_current
1.14% [k] acpi_os_read_port
1.08% [k] _spin_lock
The '[k]' differentiator is a quick clue that it's a kernel symbol,
without having to bring in the full dso column.
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | Documentation/perf_counter/builtin-report.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c index 9783d1e493c4..ca303fd74a71 100644 --- a/Documentation/perf_counter/builtin-report.c +++ b/Documentation/perf_counter/builtin-report.c | |||
@@ -504,7 +504,7 @@ sort__comm_print(FILE *fp, struct hist_entry *self) | |||
504 | } | 504 | } |
505 | 505 | ||
506 | static struct sort_entry sort_comm = { | 506 | static struct sort_entry sort_comm = { |
507 | .header = " Command", | 507 | .header = " Command", |
508 | .cmp = sort__comm_cmp, | 508 | .cmp = sort__comm_cmp, |
509 | .collapse = sort__comm_collapse, | 509 | .collapse = sort__comm_collapse, |
510 | .print = sort__comm_print, | 510 | .print = sort__comm_print, |
@@ -569,10 +569,12 @@ sort__sym_print(FILE *fp, struct hist_entry *self) | |||
569 | if (verbose) | 569 | if (verbose) |
570 | ret += fprintf(fp, "%#018llx ", (__u64)self->ip); | 570 | ret += fprintf(fp, "%#018llx ", (__u64)self->ip); |
571 | 571 | ||
572 | if (self->sym) | 572 | if (self->sym) { |
573 | ret += fprintf(fp, "%s", self->sym->name); | 573 | ret += fprintf(fp, "[%c] %s", |
574 | else | 574 | self->dso == kernel_dso ? 'k' : '.', self->sym->name); |
575 | } else { | ||
575 | ret += fprintf(fp, "%#016llx", (__u64)self->ip); | 576 | ret += fprintf(fp, "%#016llx", (__u64)self->ip); |
577 | } | ||
576 | 578 | ||
577 | return ret; | 579 | return ret; |
578 | } | 580 | } |
@@ -586,9 +588,9 @@ static struct sort_entry sort_sym = { | |||
586 | static int sort__need_collapse = 0; | 588 | static int sort__need_collapse = 0; |
587 | 589 | ||
588 | struct sort_dimension { | 590 | struct sort_dimension { |
589 | char *name; | 591 | char *name; |
590 | struct sort_entry *entry; | 592 | struct sort_entry *entry; |
591 | int taken; | 593 | int taken; |
592 | }; | 594 | }; |
593 | 595 | ||
594 | static struct sort_dimension sort_dimensions[] = { | 596 | static struct sort_dimension sort_dimensions[] = { |