summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/cs-etm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-09-08 06:41:40 +0200
committerDave Airlie <airlied@redhat.com>2020-09-08 06:41:40 +0200
commitce5c207c6b8dd9cdeaeeb2345b8a69335c0d98bf (patch)
tree3a54614d597b7b92ada36c5ea26dc994216b628b /tools/perf/util/cs-etm.c
parentMerge tag 'drm-intel-next-2020-08-24-1' of git://anongit.freedesktop.org/drm/... (diff)
parentLinux 5.9-rc4 (diff)
downloadlinux-ce5c207c6b8dd9cdeaeeb2345b8a69335c0d98bf.tar.xz
linux-ce5c207c6b8dd9cdeaeeb2345b8a69335c0d98bf.zip
Merge tag 'v5.9-rc4' into drm-next
Backmerge 5.9-rc4 as there is a nasty qxl conflict that needs to be resolved. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'tools/perf/util/cs-etm.c')
-rw-r--r--tools/perf/util/cs-etm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index c283223fb31f..a2a369e2fbb6 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -1344,8 +1344,15 @@ static int cs_etm__synth_events(struct cs_etm_auxtrace *etm,
attr.sample_type &= ~(u64)PERF_SAMPLE_ADDR;
}
- if (etm->synth_opts.last_branch)
+ if (etm->synth_opts.last_branch) {
attr.sample_type |= PERF_SAMPLE_BRANCH_STACK;
+ /*
+ * We don't use the hardware index, but the sample generation
+ * code uses the new format branch_stack with this field,
+ * so the event attributes must indicate that it's present.
+ */
+ attr.branch_sample_type |= PERF_SAMPLE_BRANCH_HW_INDEX;
+ }
if (etm->synth_opts.instructions) {
attr.config = PERF_COUNT_HW_INSTRUCTIONS;