diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-08-06 13:41:19 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-09 16:19:14 -0300 |
commit | 166ccc9c244828da9214a0e7ba4d5dde6a26dcc1 (patch) | |
tree | 3fbe7d7ff788ca17842ea0d5ccc4efe5a6becb62 /tools/perf/util/symbol.c | |
parent | b25085be457b4292a563c0bf2fab2ef5b7bb3c45 (diff) | |
download | op-kernel-dev-166ccc9c244828da9214a0e7ba4d5dde6a26dcc1.zip op-kernel-dev-166ccc9c244828da9214a0e7ba4d5dde6a26dcc1.tar.gz |
perf symbols: Introduce symbol__elf_init()
The symbol__elf_init() is for initializing internal libelf data
structure and getting rid of its dependency outside of ELF/symboling
handling code.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1344228082-15569-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 8b63b67..a61fec4 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1453,6 +1453,11 @@ out_close: return err; } +void symbol__elf_init(void) +{ + elf_version(EV_CURRENT); +} + static bool dso__build_id_equal(const struct dso *dso, u8 *build_id) { return memcmp(dso->build_id, build_id, sizeof(dso->build_id)) == 0; @@ -2754,7 +2759,8 @@ int symbol__init(void) symbol_conf.priv_size = ALIGN(symbol_conf.priv_size, sizeof(u64)); - elf_version(EV_CURRENT); + symbol__elf_init(); + if (symbol_conf.sort_by_name) symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) - sizeof(struct symbol)); |