summaryrefslogtreecommitdiff
path: root/patches.tizen/0360-perf-hists-Free-unused-mem-info-of-a-matched-hist-en.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.tizen/0360-perf-hists-Free-unused-mem-info-of-a-matched-hist-en.patch')
-rw-r--r--patches.tizen/0360-perf-hists-Free-unused-mem-info-of-a-matched-hist-en.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/patches.tizen/0360-perf-hists-Free-unused-mem-info-of-a-matched-hist-en.patch b/patches.tizen/0360-perf-hists-Free-unused-mem-info-of-a-matched-hist-en.patch
new file mode 100644
index 00000000000..db64b1784d8
--- /dev/null
+++ b/patches.tizen/0360-perf-hists-Free-unused-mem-info-of-a-matched-hist-en.patch
@@ -0,0 +1,43 @@
+From 52a921319f09b9de8df8cb08f71a31329da76bf7 Mon Sep 17 00:00:00 2001
+From: Namhyung Kim <namhyung.kim@lge.com>
+Date: Mon, 1 Apr 2013 20:35:18 +0900
+Subject: [PATCH 0360/1302] 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>
+Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
+---
+ tools/perf/util/hist.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
+index 9438d57..514fc04 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
+--
+1.8.3.2
+