aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-07-30 17:31:28 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-07-30 17:31:28 -0400
commitd65a458b348cd458413b3cfec66e43ebd0367646 (patch)
tree984d730e5a81e4ae7c04b9f664d8a1cacdd0c6e6 /tools/perf/util/symbol.c
parent591765fdaf7ea1888157f342b67b0461f2e5ed9b (diff)
perf tools: Release session and symbol resources on exit
So that we reduce the noise when looking for leaks using tools such as valgrind. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index d99497ec52aa..94cdf68440cd 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2245,6 +2245,15 @@ out_free_comm_list:
2245 return -1; 2245 return -1;
2246} 2246}
2247 2247
2248void symbol__exit(void)
2249{
2250 strlist__delete(symbol_conf.sym_list);
2251 strlist__delete(symbol_conf.dso_list);
2252 strlist__delete(symbol_conf.comm_list);
2253 vmlinux_path__exit();
2254 symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL;
2255}
2256
2248int machines__create_kernel_maps(struct rb_root *self, pid_t pid) 2257int machines__create_kernel_maps(struct rb_root *self, pid_t pid)
2249{ 2258{
2250 struct machine *machine = machines__findnew(self, pid); 2259 struct machine *machine = machines__findnew(self, pid);