diff options
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 1cc6ea4b7065..0ced178ce306 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -304,7 +304,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template, | |||
304 | size_t callchain_size = 0; | 304 | size_t callchain_size = 0; |
305 | struct hist_entry *he; | 305 | struct hist_entry *he; |
306 | 306 | ||
307 | if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) | 307 | if (symbol_conf.use_callchain) |
308 | callchain_size = sizeof(struct callchain_root); | 308 | callchain_size = sizeof(struct callchain_root); |
309 | 309 | ||
310 | he = zalloc(sizeof(*he) + callchain_size); | 310 | he = zalloc(sizeof(*he) + callchain_size); |
@@ -737,7 +737,7 @@ iter_add_single_cumulative_entry(struct hist_entry_iter *iter, | |||
737 | iter->he = he; | 737 | iter->he = he; |
738 | he_cache[iter->curr++] = he; | 738 | he_cache[iter->curr++] = he; |
739 | 739 | ||
740 | callchain_append(he->callchain, &callchain_cursor, sample->period); | 740 | hist_entry__append_callchain(he, sample); |
741 | 741 | ||
742 | /* | 742 | /* |
743 | * We need to re-initialize the cursor since callchain_append() | 743 | * We need to re-initialize the cursor since callchain_append() |
@@ -810,7 +810,8 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter, | |||
810 | iter->he = he; | 810 | iter->he = he; |
811 | he_cache[iter->curr++] = he; | 811 | he_cache[iter->curr++] = he; |
812 | 812 | ||
813 | callchain_append(he->callchain, &cursor, sample->period); | 813 | if (symbol_conf.use_callchain) |
814 | callchain_append(he->callchain, &cursor, sample->period); | ||
814 | return 0; | 815 | return 0; |
815 | } | 816 | } |
816 | 817 | ||