All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, jolsa@redhat.com, acme@redhat.com,
	mingo@elte.hu, namhyung.kim@lge.com
Subject: [PATCH] perf tools: mark branch_info maps as referenced
Date: Mon, 14 Jan 2013 15:02:45 +0100	[thread overview]
Message-ID: <20130114140245.GA4692@quad> (raw)


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>
--

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index cb17e2a..ab35b82 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -242,6 +242,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);
 

             reply	other threads:[~2013-01-14 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 14:02 Stephane Eranian [this message]
2013-01-14 14:18 ` [PATCH] perf tools: mark branch_info maps as referenced Jiri Olsa
2013-01-25 11:51 ` [tip:perf/core] perf tools: Mark " tip-bot for Stephane Eranian

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=20130114140245.GA4692@quad \
    --to=eranian@google.com \
    --cc=acme@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung.kim@lge.com \
    --cc=peterz@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.