From: tip-bot for Stephane Eranian <eranian@google.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org,
eranian@google.com, hpa@zytor.com, mingo@kernel.org,
peterz@infradead.org, namhyung.kim@lge.com, jolsa@redhat.com,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] perf tools: Mark branch_info maps as referenced
Date: Fri, 25 Jan 2013 03:51:45 -0800 [thread overview]
Message-ID: <tip-3cf0cb1f899640f1eb8b3984739cfd70375c9c36@git.kernel.org> (raw)
In-Reply-To: <20130114140245.GA4692@quad>
Commit-ID: 3cf0cb1f899640f1eb8b3984739cfd70375c9c36
Gitweb: http://git.kernel.org/tip/3cf0cb1f899640f1eb8b3984739cfd70375c9c36
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Mon, 14 Jan 2013 15:02:45 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 24 Jan 2013 16:40:38 -0300
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 <eranian@google.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20130114140245.GA4692@quad
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
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);
prev parent reply other threads:[~2013-01-25 11:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 14:02 [PATCH] perf tools: mark branch_info maps as referenced Stephane Eranian
2013-01-14 14:18 ` Jiri Olsa
2013-01-25 11:51 ` tip-bot for Stephane Eranian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-3cf0cb1f899640f1eb8b3984739cfd70375c9c36@git.kernel.org \
--to=eranian@google.com \
--cc=acme@redhat.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox