summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-10-04 03:30:48 +0400
committerIngo Molnar <mingo@elte.hu>2009-10-04 21:37:11 +0400
commitec218fc4a796a1b584741d59ef22615d96981188 (patch)
tree59e1060af0aa674d32bb81701bd08802209ef416 /tools/perf/builtin-report.c
parent9735abf11bec48bfbbb1b54772a02deb2ae0c403 (diff)
downloadlinux-ec218fc4a796a1b584741d59ef22615d96981188.tar.xz
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-report.c')
-rw-r--r--tools/perf/builtin-report.c35
1 files changed, 13 insertions, 22 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 0e83ffcbe55a..fe4aadc9630f 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -38,7 +38,6 @@ static struct strlist *dso_list, *comm_list, *sym_list;
static int force;
static int input;
-static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV;
static int full_paths;
static int show_nr_samples;
@@ -600,7 +599,6 @@ static int
process_sample_event(event_t *event, unsigned long offset, unsigned long head)
{
char level;
- int show = 0;
struct symbol *sym = NULL;
struct thread *thread;
u64 ip = event->ip.ip;
@@ -657,42 +655,35 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
if (cpumode == 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 (cpumode == PERF_RECORD_MISC_USER) {
-
- show = SHOW_USER;
level = '.';
sym = resolve_symbol(thread, &map, &ip);
} else {
- show = SHOW_HV;
level = 'H';
-
dump_printf(" ...... dso: [hypervisor]\n");
}
- if (show & show_mask) {
- if (dso_list &&
- (!map || !map->dso ||
- !(strlist__has_entry(dso_list, map->dso->short_name) ||
- (map->dso->short_name != map->dso->long_name &&
- strlist__has_entry(dso_list, map->dso->long_name)))))
- return 0;
+ if (dso_list &&
+ (!map || !map->dso ||
+ !(strlist__has_entry(dso_list, map->dso->short_name) ||
+ (map->dso->short_name != map->dso->long_name &&
+ strlist__has_entry(dso_list, map->dso->long_name)))))
+ return 0;
- if (sym_list && sym && !strlist__has_entry(sym_list, sym->name))
- return 0;
+ if (sym_list && sym && !strlist__has_entry(sym_list, sym->name))
+ return 0;
- if (hist_entry__add(thread, map, sym, ip,
- chain, level, period)) {
- eprintf("problem incrementing symbol count, skipping event\n");
- return -1;
- }
+ if (hist_entry__add(thread, map, sym, ip,
+ chain, level, period)) {
+ eprintf("problem incrementing symbol count, skipping event\n");
+ return -1;
}
+
total += period;
return 0;