Commit e1d4e08d authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'perf/urgent' of...

Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent
parents 5e11637e 85e00b55
...@@ -2268,6 +2268,9 @@ static int setup_list(struct strlist **list, const char *list_str, ...@@ -2268,6 +2268,9 @@ static int setup_list(struct strlist **list, const char *list_str,
int symbol__init(void) int symbol__init(void)
{ {
if (symbol_conf.initialized)
return 0;
elf_version(EV_CURRENT); elf_version(EV_CURRENT);
if (symbol_conf.sort_by_name) if (symbol_conf.sort_by_name)
symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) - symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) -
...@@ -2293,6 +2296,7 @@ int symbol__init(void) ...@@ -2293,6 +2296,7 @@ int symbol__init(void)
symbol_conf.sym_list_str, "symbol") < 0) symbol_conf.sym_list_str, "symbol") < 0)
goto out_free_comm_list; goto out_free_comm_list;
symbol_conf.initialized = true;
return 0; return 0;
out_free_dso_list: out_free_dso_list:
...@@ -2304,11 +2308,14 @@ int symbol__init(void) ...@@ -2304,11 +2308,14 @@ int symbol__init(void)
void symbol__exit(void) void symbol__exit(void)
{ {
if (!symbol_conf.initialized)
return;
strlist__delete(symbol_conf.sym_list); strlist__delete(symbol_conf.sym_list);
strlist__delete(symbol_conf.dso_list); strlist__delete(symbol_conf.dso_list);
strlist__delete(symbol_conf.comm_list); strlist__delete(symbol_conf.comm_list);
vmlinux_path__exit(); vmlinux_path__exit();
symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL; symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL;
symbol_conf.initialized = false;
} }
int machines__create_kernel_maps(struct rb_root *self, pid_t pid) int machines__create_kernel_maps(struct rb_root *self, pid_t pid)
......
...@@ -69,7 +69,8 @@ struct symbol_conf { ...@@ -69,7 +69,8 @@ struct symbol_conf {
show_nr_samples, show_nr_samples,
use_callchain, use_callchain,
exclude_other, exclude_other,
show_cpu_utilization; show_cpu_utilization,
initialized;
const char *vmlinux_name, const char *vmlinux_name,
*source_prefix, *source_prefix,
*field_sep; *field_sep;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment