summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-12-15 20:04:39 -0200
committerIngo Molnar <mingo@elte.hu>2009-12-16 08:53:48 +0100
commit75be6cf48738aec68aac49b428423569492cfba3 (patch)
treed7f5ceb028361e8b725ba6f3b8219e66c7b89790 /tools/perf/builtin-annotate.c
parent7ef17aafc98406d01ebbf7fe98ef1332b70d20bb (diff)
downloadlinux-3.10-75be6cf48738aec68aac49b428423569492cfba3.tar.gz
linux-3.10-75be6cf48738aec68aac49b428423569492cfba3.tar.bz2
linux-3.10-75be6cf48738aec68aac49b428423569492cfba3.zip
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-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 2e2855a685c..e656e25f1c1 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -51,11 +51,6 @@ struct sym_priv {
struct sym_ext *ext;
};
-static struct symbol_conf symbol_conf = {
- .priv_size = sizeof(struct sym_priv),
- .try_vmlinux_path = true,
-};
-
static const char *sym_hist_filter;
static int symbol_filter(struct map *map __used, struct symbol *sym)
@@ -464,10 +459,10 @@ static struct perf_event_ops event_ops = {
static int __cmd_annotate(void)
{
- struct perf_session *session = perf_session__new(input_name, O_RDONLY,
- force, &symbol_conf);
int ret;
+ struct perf_session *session;
+ session = perf_session__new(input_name, O_RDONLY, force);
if (session == NULL)
return -ENOMEM;
@@ -523,7 +518,10 @@ static const struct option options[] = {
int cmd_annotate(int argc, const char **argv, const char *prefix __used)
{
- if (symbol__init(&symbol_conf) < 0)
+ symbol_conf.priv_size = sizeof(struct sym_priv);
+ symbol_conf.try_vmlinux_path = true;
+
+ if (symbol__init() < 0)
return -1;
argc = parse_options(argc, argv, options, annotate_usage, 0);