diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-10-03 19:30:48 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-04 13:37:11 -0400 |
commit | ec218fc4a796a1b584741d59ef22615d96981188 (patch) | |
tree | 59e1060af0aa674d32bb81701bd08802209ef416 /tools/perf/builtin-annotate.c | |
parent | 9735abf11bec48bfbbb1b54772a02deb2ae0c403 (diff) |
perf tools: Remove show_mask bitmask
As it was not being exposed via any command line and with --dsos/--comms
we can do this and even more, like asking for just kernel + some module:
[root@doppio linux-2.6-tip]# perf report --dsos \[kernel\],\[drm\]
--vmlinux /home/acme/git/build/tip-recvmmsg/vmlinux --modules | head -15
# Samples: 619669
#
# Overhead Command Shared Object Symbol
# ........ ............... ............. ......
#
7.12% swapper [kernel] [k] read_hpet
6.86% init [kernel] [k] read_hpet
6.22% init [kernel] [k] mwait_idle_with_hints
5.34% swapper [kernel] [k] mwait_idle_with_hints
3.01% firefox [kernel] [.] vread_hpet
2.14% Xorg [drm] [k] drm_clflush_pages
2.09% pidgin [kernel] [.] vread_hpet
1.58% npviewer.bin [kernel] [.] vread_hpet
1.37% swapper [kernel] [k] hpet_next_event
1.23% Xorg [kernel] [k] read_hpet
[root@doppio linux-2.6-tip]#
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <20091003233048.GA30535@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 855094234f2d..35ed97bd0c63 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -29,7 +29,6 @@ static char const *input_name = "perf.data"; | |||
29 | 29 | ||
30 | static int force; | 30 | static int force; |
31 | static int input; | 31 | static int input; |
32 | static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV; | ||
33 | 32 | ||
34 | static int full_paths; | 33 | static int full_paths; |
35 | 34 | ||
@@ -97,7 +96,6 @@ static int | |||
97 | process_sample_event(event_t *event, unsigned long offset, unsigned long head) | 96 | process_sample_event(event_t *event, unsigned long offset, unsigned long head) |
98 | { | 97 | { |
99 | char level; | 98 | char level; |
100 | int show = 0; | ||
101 | struct thread *thread; | 99 | struct thread *thread; |
102 | u64 ip = event->ip.ip; | 100 | u64 ip = event->ip.ip; |
103 | struct map *map = NULL; | 101 | struct map *map = NULL; |
@@ -121,13 +119,11 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head) | |||
121 | } | 119 | } |
122 | 120 | ||
123 | if (event->header.misc & PERF_RECORD_MISC_KERNEL) { | 121 | if (event->header.misc & PERF_RECORD_MISC_KERNEL) { |
124 | show = SHOW_KERNEL; | ||
125 | level = 'k'; | 122 | level = 'k'; |
126 | sym = kernel_maps__find_symbol(ip, &map); | 123 | sym = kernel_maps__find_symbol(ip, &map); |
127 | dump_printf(" ...... dso: %s\n", | 124 | dump_printf(" ...... dso: %s\n", |
128 | map ? map->dso->long_name : "<not found>"); | 125 | map ? map->dso->long_name : "<not found>"); |
129 | } else if (event->header.misc & PERF_RECORD_MISC_USER) { | 126 | } else if (event->header.misc & PERF_RECORD_MISC_USER) { |
130 | show = SHOW_USER; | ||
131 | level = '.'; | 127 | level = '.'; |
132 | map = thread__find_map(thread, ip); | 128 | map = thread__find_map(thread, ip); |
133 | if (map != NULL) { | 129 | if (map != NULL) { |
@@ -153,17 +149,14 @@ got_map: | |||
153 | dump_printf(" ...... dso: %s\n", | 149 | dump_printf(" ...... dso: %s\n", |
154 | map ? map->dso->long_name : "<not found>"); | 150 | map ? map->dso->long_name : "<not found>"); |
155 | } else { | 151 | } else { |
156 | show = SHOW_HV; | ||
157 | level = 'H'; | 152 | level = 'H'; |
158 | dump_printf(" ...... dso: [hypervisor]\n"); | 153 | dump_printf(" ...... dso: [hypervisor]\n"); |
159 | } | 154 | } |
160 | 155 | ||
161 | if (show & show_mask) { | 156 | if (hist_entry__add(thread, map, sym, ip, 1, level)) { |
162 | if (hist_entry__add(thread, map, sym, ip, 1, level)) { | 157 | fprintf(stderr, "problem incrementing symbol count, " |
163 | fprintf(stderr, | 158 | "skipping event\n"); |
164 | "problem incrementing symbol count, skipping event\n"); | 159 | return -1; |
165 | return -1; | ||
166 | } | ||
167 | } | 160 | } |
168 | total++; | 161 | total++; |
169 | 162 | ||