perf symbols: Simplify symbol machinery setup
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 24 Nov 2009 14:05:15 +0000 (12:05 -0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 24 Nov 2009 15:37:02 +0000 (16:37 +0100)
commitb32d133aec5dc882cf783a293f393bfb3f4379e1
tree41fc56a4aaec8892a235ffd530b36278d147dc4e
parent7cc017edb9459193d3b581155a14029e4bef0c49
perf symbols: Simplify symbol machinery setup

And also express its configuration toggles via a struct.

Now all one has to do is to call symbol__init(NULL) if the
defaults are OK, or pass a struct symbol_conf pointer with the
desired configuration.

If a tool uses kernel_maps__find_symbol() to look at the kernel
and modules mappings for a symbol but didn't call symbol__init()
first, that will generate a one time warning too, alerting the
subcommand developer that symbol__init() must be called.

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: <1259071517-3242-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 files changed:
tools/perf/builtin-annotate.c
tools/perf/builtin-kmem.c
tools/perf/builtin-report.c
tools/perf/builtin-sched.c
tools/perf/builtin-top.c
tools/perf/builtin-trace.c
tools/perf/util/data_map.c
tools/perf/util/data_map.h
tools/perf/util/header.c
tools/perf/util/include/asm/bug.h [new file with mode: 0644]
tools/perf/util/symbol.c
tools/perf/util/symbol.h