From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756678Ab3AXUc4 (ORCPT ); Thu, 24 Jan 2013 15:32:56 -0500 Received: from merlin.infradead.org ([205.233.59.134]:50152 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755850Ab3AXUIl (ORCPT ); Thu, 24 Jan 2013 15:08:41 -0500 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Stephane Eranian , Ingo Molnar , Jiri Olsa , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 54/74] perf tools: Mark branch_info maps as referenced Date: Thu, 24 Jan 2013 17:08:03 -0300 Message-Id: <1359058103-31645-55-git-send-email-acme@infradead.org> X-Mailer: git-send-email 1.8.1.1.361.gec3ae6e In-Reply-To: <1359058103-31645-1-git-send-email-acme@infradead.org> References: <1359058103-31645-1-git-send-email-acme@infradead.org> Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephane Eranian 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 --- tools/perf/util/hist.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 1.8.1.1.361.gec3ae6e