perf callchain: Free callchains when hist entries are deleted
authorNamhyung Kim <namhyung@kernel.org>
Tue, 30 Dec 2014 05:38:13 +0000 (14:38 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 8 Jan 2015 14:56:35 +0000 (11:56 -0300)
commitd114960c488b5a95705a04bba305f931cef0efd6
treef77f5ed8815a9fd1ce543b837be35c70d8af9c8c
parent5ca8271022da8583f0d618aeda5b2bae785e7882
perf callchain: Free callchains when hist entries are deleted

Markus reported that "perf top -g" can leak ~300MB per second on his
machine.  This is partly because it missed to free callchains when hist
entries are deleted.  Fix it.

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20141230053813.GD6081@sejong
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/callchain.c
tools/perf/util/callchain.h
tools/perf/util/hist.c