From c2f1580307056e31e9f65b472157575ebd64c565 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 10 Sep 2010 08:05:34 +0200 Subject: [PATCH] --- yaml --- r: 210543 b: refs/heads/master c: 9efdda310cb26bdc28429cb831c3ec5fa270feb7 h: refs/heads/master i: 210541: c13cb1d56dbebebbcccf8d943be2eb906512606e 210539: 9eabc5db08feee14fdaa55123d99b584c5108c2f 210535: ab0c5c4950f629698e1caf6972ddb6786a8d00a0 210527: 00655ce3037bc1a8bce1387a63a01180f18cdafc v: v3 --- [refs] | 2 +- trunk/tools/perf/util/symbol.c | 7 +++++++ trunk/tools/perf/util/symbol.h | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e8b331429856..095cba4cb0e0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: df09162550fbb53354f0c88e85b5d0e6129ee9cc +refs/heads/master: 9efdda310cb26bdc28429cb831c3ec5fa270feb7 diff --git a/trunk/tools/perf/util/symbol.c b/trunk/tools/perf/util/symbol.c index 1a367734e016..b2f5ae97f33d 100644 --- a/trunk/tools/perf/util/symbol.c +++ b/trunk/tools/perf/util/symbol.c @@ -2268,6 +2268,9 @@ static int setup_list(struct strlist **list, const char *list_str, int symbol__init(void) { + if (symbol_conf.initialized) + return 0; + elf_version(EV_CURRENT); if (symbol_conf.sort_by_name) symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) - @@ -2293,6 +2296,7 @@ int symbol__init(void) symbol_conf.sym_list_str, "symbol") < 0) goto out_free_comm_list; + symbol_conf.initialized = true; return 0; out_free_dso_list: @@ -2304,11 +2308,14 @@ int symbol__init(void) void symbol__exit(void) { + if (!symbol_conf.initialized) + return; strlist__delete(symbol_conf.sym_list); strlist__delete(symbol_conf.dso_list); strlist__delete(symbol_conf.comm_list); vmlinux_path__exit(); 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) diff --git a/trunk/tools/perf/util/symbol.h b/trunk/tools/perf/util/symbol.h index b7a8da4af5a0..ea95c2756f05 100644 --- a/trunk/tools/perf/util/symbol.h +++ b/trunk/tools/perf/util/symbol.h @@ -69,7 +69,8 @@ struct symbol_conf { show_nr_samples, use_callchain, exclude_other, - show_cpu_utilization; + show_cpu_utilization, + initialized; const char *vmlinux_name, *source_prefix, *field_sep;