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 <[email protected]>
Cc: Frédéric Weisbecker <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Mike Galbraith <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 8550942..35ed97b 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -29,7 +29,6 @@
static int force;
static int input;
-static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV;
static int full_paths;
@@ -97,7 +96,6 @@
process_sample_event(event_t *event, unsigned long offset, unsigned long head)
{
char level;
- int show = 0;
struct thread *thread;
u64 ip = event->ip.ip;
struct map *map = NULL;
@@ -121,13 +119,11 @@
}
if (event->header.misc & PERF_RECORD_MISC_KERNEL) {
- show = SHOW_KERNEL;
level = 'k';
sym = kernel_maps__find_symbol(ip, &map);
dump_printf(" ...... dso: %s\n",
map ? map->dso->long_name : "<not found>");
} else if (event->header.misc & PERF_RECORD_MISC_USER) {
- show = SHOW_USER;
level = '.';
map = thread__find_map(thread, ip);
if (map != NULL) {
@@ -153,17 +149,14 @@
dump_printf(" ...... dso: %s\n",
map ? map->dso->long_name : "<not found>");
} else {
- show = SHOW_HV;
level = 'H';
dump_printf(" ...... dso: [hypervisor]\n");
}
- if (show & show_mask) {
- if (hist_entry__add(thread, map, sym, ip, 1, level)) {
- fprintf(stderr,
- "problem incrementing symbol count, skipping event\n");
- return -1;
- }
+ if (hist_entry__add(thread, map, sym, ip, 1, level)) {
+ fprintf(stderr, "problem incrementing symbol count, "
+ "skipping event\n");
+ return -1;
}
total++;