aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-10-08 03:14:51 -0400
committerIngo Molnar <mingo@elte.hu>2010-10-08 03:15:00 -0400
commit153db80f8cf74e8700cac96305b6c0b92918f17c (patch)
treec2afb28e7b3f4fbf0aacd9edd39d7f895321ca0c /tools/perf/util/symbol.c
parent5fd03ddab7fdbc44bfb2d183a4531c26a8dbca5a (diff)
parentcb655d0f3d57c23db51b981648e452988c0223f9 (diff)
Merge commit 'v2.6.36-rc7' into core/memblock
Merge reason: Update from -rc3 to -rc7. Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 1a367734e016..b2f5ae97f33d 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2268,6 +2268,9 @@ static int setup_list(struct strlist **list, const char *list_str,
2268 2268
2269int symbol__init(void) 2269int symbol__init(void)
2270{ 2270{
2271 if (symbol_conf.initialized)
2272 return 0;
2273
2271 elf_version(EV_CURRENT); 2274 elf_version(EV_CURRENT);
2272 if (symbol_conf.sort_by_name) 2275 if (symbol_conf.sort_by_name)
2273 symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) - 2276 symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) -
@@ -2293,6 +2296,7 @@ int symbol__init(void)
2293 symbol_conf.sym_list_str, "symbol") < 0) 2296 symbol_conf.sym_list_str, "symbol") < 0)
2294 goto out_free_comm_list; 2297 goto out_free_comm_list;
2295 2298
2299 symbol_conf.initialized = true;
2296 return 0; 2300 return 0;
2297 2301
2298out_free_dso_list: 2302out_free_dso_list:
@@ -2304,11 +2308,14 @@ out_free_comm_list:
2304 2308
2305void symbol__exit(void) 2309void symbol__exit(void)
2306{ 2310{
2311 if (!symbol_conf.initialized)
2312 return;
2307 strlist__delete(symbol_conf.sym_list); 2313 strlist__delete(symbol_conf.sym_list);
2308 strlist__delete(symbol_conf.dso_list); 2314 strlist__delete(symbol_conf.dso_list);
2309 strlist__delete(symbol_conf.comm_list); 2315 strlist__delete(symbol_conf.comm_list);
2310 vmlinux_path__exit(); 2316 vmlinux_path__exit();
2311 symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL; 2317 symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL;
2318 symbol_conf.initialized = false;
2312} 2319}
2313 2320
2314int machines__create_kernel_maps(struct rb_root *self, pid_t pid) 2321int machines__create_kernel_maps(struct rb_root *self, pid_t pid)