summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/intel-pt.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-10-06 16:19:24 +0100
committerMark Brown <broonie@kernel.org>2020-10-06 16:19:24 +0100
commitfd6b519a30a7179026d22c98d6bf10bb5ca8ca27 (patch)
treee4a6bc4d8548a5b8db7148a18eb257b84e72d48b /tools/perf/util/intel-pt.c
parent43499134f50a77844f0503df2c995f43b858f4c3 (diff)
parent856deb866d16e29bd65952e0289066f6078af773 (diff)
downloadlinux-stable-fd6b519a30a7179026d22c98d6bf10bb5ca8ca27.tar.gz
linux-stable-fd6b519a30a7179026d22c98d6bf10bb5ca8ca27.tar.bz2
linux-stable-fd6b519a30a7179026d22c98d6bf10bb5ca8ca27.zip
Merge tag 'v5.9-rc5' into asoc-5.10
Linux 5.9-rc5
Diffstat (limited to 'tools/perf/util/intel-pt.c')
-rw-r--r--tools/perf/util/intel-pt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 2a8d245351e7..0af4e81c46e2 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -3017,8 +3017,15 @@ static int intel_pt_synth_events(struct intel_pt *pt,
if (pt->synth_opts.callchain)
attr.sample_type |= PERF_SAMPLE_CALLCHAIN;
- if (pt->synth_opts.last_branch)
+ if (pt->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 (pt->synth_opts.instructions) {
attr.config = PERF_COUNT_HW_INSTRUCTIONS;