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-probe.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-probe.c')
-rw-r--r-- | tools/perf/builtin-probe.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 520b064b46d8..7e741f54d798 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c | |||
@@ -57,7 +57,6 @@ static struct { | |||
57 | int nr_probe; | 57 | int nr_probe; |
58 | struct probe_point probes[MAX_PROBES]; | 58 | struct probe_point probes[MAX_PROBES]; |
59 | struct strlist *dellist; | 59 | struct strlist *dellist; |
60 | struct symbol_conf conf; | ||
61 | struct perf_session *psession; | 60 | struct perf_session *psession; |
62 | struct map *kmap; | 61 | struct map *kmap; |
63 | } session; | 62 | } session; |
@@ -151,7 +150,7 @@ static const struct option options[] = { | |||
151 | OPT_BOOLEAN('v', "verbose", &verbose, | 150 | OPT_BOOLEAN('v', "verbose", &verbose, |
152 | "be more verbose (show parsed arguments, etc)"), | 151 | "be more verbose (show parsed arguments, etc)"), |
153 | #ifndef NO_LIBDWARF | 152 | #ifndef NO_LIBDWARF |
154 | OPT_STRING('k', "vmlinux", &session.conf.vmlinux_name, | 153 | OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, |
155 | "file", "vmlinux pathname"), | 154 | "file", "vmlinux pathname"), |
156 | #endif | 155 | #endif |
157 | OPT_BOOLEAN('l', "list", &session.list_events, | 156 | OPT_BOOLEAN('l', "list", &session.list_events, |
@@ -224,13 +223,12 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) | |||
224 | } | 223 | } |
225 | 224 | ||
226 | /* Initialize symbol maps for vmlinux */ | 225 | /* Initialize symbol maps for vmlinux */ |
227 | session.conf.sort_by_name = true; | 226 | symbol_conf.sort_by_name = true; |
228 | if (session.conf.vmlinux_name == NULL) | 227 | if (symbol_conf.vmlinux_name == NULL) |
229 | session.conf.try_vmlinux_path = true; | 228 | symbol_conf.try_vmlinux_path = true; |
230 | if (symbol__init(&session.conf) < 0) | 229 | if (symbol__init() < 0) |
231 | die("Failed to init symbol map."); | 230 | die("Failed to init symbol map."); |
232 | session.psession = perf_session__new(NULL, O_WRONLY, false, | 231 | session.psession = perf_session__new(NULL, O_WRONLY, false); |
233 | &session.conf); | ||
234 | if (session.psession == NULL) | 232 | if (session.psession == NULL) |
235 | die("Failed to init perf_session."); | 233 | die("Failed to init perf_session."); |
236 | session.kmap = map_groups__find_by_name(&session.psession->kmaps, | 234 | session.kmap = map_groups__find_by_name(&session.psession->kmaps, |