diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-12-15 17:04:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-16 02:53:48 -0500 |
commit | 75be6cf48738aec68aac49b428423569492cfba3 (patch) | |
tree | d7f5ceb028361e8b725ba6f3b8219e66c7b89790 /tools/perf/builtin-top.c | |
parent | 7ef17aafc98406d01ebbf7fe98ef1332b70d20bb (diff) |
perf symbols: Make symbol_conf global
This simplifies a lot of functions, less stuff to be done by
tool writers.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260914682-29652-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 296e809c2538..cd89b6d036b7 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -80,7 +80,6 @@ static int dump_symtab = 0; | |||
80 | static bool hide_kernel_symbols = false; | 80 | static bool hide_kernel_symbols = false; |
81 | static bool hide_user_symbols = false; | 81 | static bool hide_user_symbols = false; |
82 | static struct winsize winsize; | 82 | static struct winsize winsize; |
83 | static struct symbol_conf symbol_conf; | ||
84 | 83 | ||
85 | /* | 84 | /* |
86 | * Source | 85 | * Source |
@@ -1162,8 +1161,7 @@ static int __cmd_top(void) | |||
1162 | * FIXME: perf_session__new should allow passing a O_MMAP, so that all this | 1161 | * FIXME: perf_session__new should allow passing a O_MMAP, so that all this |
1163 | * mmap reading, etc is encapsulated in it. Use O_WRONLY for now. | 1162 | * mmap reading, etc is encapsulated in it. Use O_WRONLY for now. |
1164 | */ | 1163 | */ |
1165 | struct perf_session *session = perf_session__new(NULL, O_WRONLY, false, | 1164 | struct perf_session *session = perf_session__new(NULL, O_WRONLY, false); |
1166 | &symbol_conf); | ||
1167 | if (session == NULL) | 1165 | if (session == NULL) |
1168 | return -ENOMEM; | 1166 | return -ENOMEM; |
1169 | 1167 | ||
@@ -1284,7 +1282,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) | |||
1284 | (nr_counters + 1) * sizeof(unsigned long)); | 1282 | (nr_counters + 1) * sizeof(unsigned long)); |
1285 | if (symbol_conf.vmlinux_name == NULL) | 1283 | if (symbol_conf.vmlinux_name == NULL) |
1286 | symbol_conf.try_vmlinux_path = true; | 1284 | symbol_conf.try_vmlinux_path = true; |
1287 | if (symbol__init(&symbol_conf) < 0) | 1285 | if (symbol__init() < 0) |
1288 | return -1; | 1286 | return -1; |
1289 | 1287 | ||
1290 | if (delay_secs < 1) | 1288 | if (delay_secs < 1) |