diff options
author | Dave Airlie <airlied@redhat.com> | 2018-07-04 10:27:12 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-07-04 10:27:12 +1000 |
commit | f29135ee4e0d4e01911ed569f731bfdb841cea6d (patch) | |
tree | e72d49a2f677dd069c3a673522cf785548148f71 /tools/perf/util/hist.c | |
parent | eab976693153b9854bfa83d131374748f6ca4280 (diff) | |
parent | 021c91791a5e7e85c567452f1be3e4c2c6cb6063 (diff) | |
download | kernel_replicant_linux-f29135ee4e0d4e01911ed569f731bfdb841cea6d.tar.gz kernel_replicant_linux-f29135ee4e0d4e01911ed569f731bfdb841cea6d.tar.bz2 kernel_replicant_linux-f29135ee4e0d4e01911ed569f731bfdb841cea6d.zip |
Merge v4.18-rc3 into drm-next
Two requests have come in for a backmerge,
and I've got some pull reqs on rc2, so this
just makes sense.
Signed-off-by: Dave Airlie <airlied@redhat.com>
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, |