aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
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
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')
-rw-r--r--tools/perf/util/symbol.c7
-rw-r--r--tools/perf/util/symbol.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index a08e1cbcbbb..b39f499e575 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)
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 0a2c460b6d8..038f2201ee0 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -69,7 +69,8 @@ struct symbol_conf {
69 show_nr_samples, 69 show_nr_samples,
70 use_callchain, 70 use_callchain,
71 exclude_other, 71 exclude_other,
72 show_cpu_utilization; 72 show_cpu_utilization,
73 initialized;
73 const char *vmlinux_name, 74 const char *vmlinux_name,
74 *source_prefix, 75 *source_prefix,
75 *field_sep; 76 *field_sep;