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>
This commit is contained in:
Arnaldo Carvalho de Melo 2009-10-03 20:30:48 -03:00 committed by Ingo Molnar
parent 9735abf11b
commit ec218fc4a7
4 changed files with 18 additions and 39 deletions

View file

@ -29,7 +29,6 @@ static char const *input_name = "perf.data";
static int force;
static int input;
static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV;
static int full_paths;
@ -97,7 +96,6 @@ static int
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 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
}
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 @@ got_map:
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++;