aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-04-01 07:35:18 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-05-28 09:23:52 -0400
commitceb2acbc2c1387c8785b3c98b482f5a2b89447c3 (patch)
tree9ab10db348d838c9bccaa2fdee6561125d64a85f /tools/perf
parent26353a61b977e57b58dd3555bc0422fea46c5ad6 (diff)
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 9438d576459d..514fc0470e38 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,
374 if (!cmp) { 374 if (!cmp) {
375 he_stat__add_period(&he->stat, period, weight); 375 he_stat__add_period(&he->stat, period, weight);
376 376
377 /*
378 * This mem info was allocated from machine__resolve_mem
379 * and will not be used anymore.
380 */
381 free(entry->mem_info);
382
377 /* If the map of an existing hist_entry has 383 /* If the map of an existing hist_entry has
378 * become out-of-date due to an exec() or 384 * become out-of-date due to an exec() or
379 * similar, update it. Otherwise we will 385 * similar, update it. Otherwise we will