summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-04-01 20:35:18 +0900
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:43:28 +0900
commit59f0c67dfc93b1ae0cb1726824f53359aaf8fe65 (patch)
tree76c05aec351b706c4174af2ff435285505ec1724 /tools/perf
parent3c169063cfabdd64d506f9e53f9098f5eed16e07 (diff)
downloadlinux-3.10-59f0c67dfc93b1ae0cb1726824f53359aaf8fe65.tar.gz
linux-3.10-59f0c67dfc93b1ae0cb1726824f53359aaf8fe65.tar.bz2
linux-3.10-59f0c67dfc93b1ae0cb1726824f53359aaf8fe65.zip
perf hists: Free unused mem info of a matched hist entry
The mem info is shared between matched entries so one should be freed. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1364816125-12212-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/hist.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 9438d576459..514fc0470e3 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -374,6 +374,12 @@ static struct hist_entry *add_hist_entry(struct hists *hists,
if (!cmp) {
he_stat__add_period(&he->stat, period, weight);
+ /*
+ * This mem info was allocated from machine__resolve_mem
+ * and will not be used anymore.
+ */
+ free(entry->mem_info);
+
/* If the map of an existing hist_entry has
* become out-of-date due to an exec() or
* similar, update it. Otherwise we will