diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-07-17 10:27:43 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-07-17 10:27:43 +0300 |
commit | 52b544bd386688177c41d53e748111c29d0ccc98 (patch) | |
tree | c2083582176e773084364af93cc44e0f94b6cde8 /tools/perf/util/hist.c | |
parent | afed7bcf9487bb28e2e2b016a195085c07416c0b (diff) | |
parent | 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe (diff) | |
download | linux-52b544bd386688177c41d53e748111c29d0ccc98.tar.xz |
Merge tag 'v4.18-rc5' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 52e8fda93a47..828cb9794c76 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -370,9 +370,11 @@ void hists__delete_entries(struct hists *hists) static int hist_entry__init(struct hist_entry *he, struct hist_entry *template, - bool sample_self) + bool sample_self, + size_t callchain_size) { *he = *template; + he->callchain_size = callchain_size; if (symbol_conf.cumulate_callchain) { he->stat_acc = malloc(sizeof(he->stat)); @@ -473,7 +475,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template, he = ops->new(callchain_size); if (he) { - err = hist_entry__init(he, template, sample_self); + err = hist_entry__init(he, template, sample_self, callchain_size); if (err) { ops->free(he); he = NULL; @@ -619,9 +621,11 @@ __hists__add_entry(struct hists *hists, .raw_data = sample->raw_data, .raw_size = sample->raw_size, .ops = ops, - }; + }, *he = hists__findnew_entry(hists, &entry, al, sample_self); - return hists__findnew_entry(hists, &entry, al, sample_self); + if (!hists->has_callchains && he && he->callchain_size != 0) + hists->has_callchains = true; + return he; } struct hist_entry *hists__add_entry(struct hists *hists, |