From: Stephane Eranian Date: Mon, 14 Jan 2013 14:02:45 +0000 (+0100) Subject: perf tools: Mark branch_info maps as referenced X-Git-Tag: upstream/snapshot3+hdmi~5742^2~13^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cf0cb1f899640f1eb8b3984739cfd70375c9c36;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git perf tools: Mark branch_info maps as referenced As noticed by Jiri, the hist_entry->branch_info.to/from maps need to be marked as referenced to avoid problems later on. So we do this when the hist_entry is allocated. Signed-off-by: Stephane Eranian Acked-by: Jiri Olsa Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20130114140245.GA4692@quad Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 9485c70..8170a3d 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -245,6 +245,14 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template) if (he->ms.map) he->ms.map->referenced = true; + + if (he->branch_info) { + if (he->branch_info->from.map) + he->branch_info->from.map->referenced = true; + if (he->branch_info->to.map) + he->branch_info->to.map->referenced = true; + } + if (symbol_conf.use_callchain) callchain_init(he->callchain);