public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: mark branch_info maps as referenced
@ 2013-01-14 14:02 Stephane Eranian
  2013-01-14 14:18 ` Jiri Olsa
  2013-01-25 11:51 ` [tip:perf/core] perf tools: Mark " tip-bot for Stephane Eranian
  0 siblings, 2 replies; 3+ messages in thread
From: Stephane Eranian @ 2013-01-14 14:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, jolsa, acme, mingo, namhyung.kim


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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf tools: mark branch_info maps as referenced
  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:perf/core] perf tools: Mark " tip-bot for Stephane Eranian
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2013-01-14 14:18 UTC (permalink / raw)
  To: Stephane Eranian; +Cc: linux-kernel, peterz, acme, mingo, namhyung.kim

On Mon, Jan 14, 2013 at 03:02:45PM +0100, Stephane Eranian wrote:
> 
> 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>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] perf tools: Mark branch_info maps as referenced
  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
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Stephane Eranian @ 2013-01-25 11:51 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, eranian, hpa, mingo, peterz, namhyung.kim,
	jolsa, tglx, mingo

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-25 11:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:perf/core] perf tools: Mark " tip-bot for Stephane Eranian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox