diff options
author | Stephane Eranian <eranian@google.com> | 2013-01-14 09:02:45 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-01-24 14:40:38 -0500 |
commit | 3cf0cb1f899640f1eb8b3984739cfd70375c9c36 (patch) | |
tree | af0c4e5487e91bfa05d8a94ad4fd2675a9e72bbf /tools | |
parent | 865c66c4183aab1d12522ca3ad3a3339d2437e5c (diff) |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/hist.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 9485c7024f5b..8170a3d11ffa 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) | |||
245 | 245 | ||
246 | if (he->ms.map) | 246 | if (he->ms.map) |
247 | he->ms.map->referenced = true; | 247 | he->ms.map->referenced = true; |
248 | |||
249 | if (he->branch_info) { | ||
250 | if (he->branch_info->from.map) | ||
251 | he->branch_info->from.map->referenced = true; | ||
252 | if (he->branch_info->to.map) | ||
253 | he->branch_info->to.map->referenced = true; | ||
254 | } | ||
255 | |||
248 | if (symbol_conf.use_callchain) | 256 | if (symbol_conf.use_callchain) |
249 | callchain_init(he->callchain); | 257 | callchain_init(he->callchain); |
250 | 258 | ||