summaryrefslogtreecommitdiff
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-07-30 18:31:28 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-07-30 18:31:28 -0300
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:
return -1;
}
+void symbol__exit(void)
+{
+ 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;
+}
+
int machines__create_kernel_maps(struct rb_root *self, pid_t pid)
{
struct machine *machine = machines__findnew(self, pid);