提交 ceb2acbc 编写于 作者: N Namhyung Kim 提交者: Arnaldo Carvalho de Melo

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: NNamhyung 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.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 26353a61
...@@ -374,6 +374,12 @@ static struct hist_entry *add_hist_entry(struct hists *hists, ...@@ -374,6 +374,12 @@ static struct hist_entry *add_hist_entry(struct hists *hists,
if (!cmp) { if (!cmp) {
he_stat__add_period(&he->stat, period, weight); 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 /* If the map of an existing hist_entry has
* become out-of-date due to an exec() or * become out-of-date due to an exec() or
* similar, update it. Otherwise we will * similar, update it. Otherwise we will
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册