aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-09-15 04:27:31 -0400
committerIngo Molnar <mingo@elte.hu>2010-09-15 04:27:31 -0400
commit3aabae7d9dfaed60effe93662f02c19bafc18537 (patch)
treeaf94cdd69add07601d9f3f5988dfc1dc255e3886 /tools/perf/util/symbol.c
parent79e406d7b00ab2b261ae32a59f266fd3b7af6f29 (diff)
parent57c072c7113f54f9512624d6c665db6184448782 (diff)
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index a08e1cbcbbbd..b39f499e575a 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2282,6 +2282,9 @@ static int setup_list(struct strlist **list, const char *list_str,
2282 2282
2283int symbol__init(void) 2283int symbol__init(void)
2284{ 2284{
2285 if (symbol_conf.initialized)
2286 return 0;
2287
2285 elf_version(EV_CURRENT); 2288 elf_version(EV_CURRENT);
2286 if (symbol_conf.sort_by_name) 2289 if (symbol_conf.sort_by_name)
2287 symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) - 2290 symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) -
@@ -2307,6 +2310,7 @@ int symbol__init(void)
2307 symbol_conf.sym_list_str, "symbol") < 0) 2310 symbol_conf.sym_list_str, "symbol") < 0)
2308 goto out_free_comm_list; 2311 goto out_free_comm_list;
2309 2312
2313 symbol_conf.initialized = true;
2310 return 0; 2314 return 0;
2311 2315
2312out_free_dso_list: 2316out_free_dso_list:
@@ -2318,11 +2322,14 @@ out_free_comm_list:
2318 2322
2319void symbol__exit(void) 2323void symbol__exit(void)
2320{ 2324{
2325 if (!symbol_conf.initialized)
2326 return;
2321 strlist__delete(symbol_conf.sym_list); 2327 strlist__delete(symbol_conf.sym_list);
2322 strlist__delete(symbol_conf.dso_list); 2328 strlist__delete(symbol_conf.dso_list);
2323 strlist__delete(symbol_conf.comm_list); 2329 strlist__delete(symbol_conf.comm_list);
2324 vmlinux_path__exit(); 2330 vmlinux_path__exit();
2325 symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL; 2331 symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL;
2332 symbol_conf.initialized = false;
2326} 2333}
2327 2334
2328int machines__create_kernel_maps(struct rb_root *self, pid_t pid) 2335int machines__create_kernel_maps(struct rb_root *self, pid_t pid)