[PATCH 2/7] perf intel-pt: Cater for CBR change in PSB+

From: Adrian Hunter
Date: Sat Jun 22 2019 - 05:34:16 EST


PSB+ provides status information only so the core-to-bus ratio (CBR) in
PSB+ will not have changed from its previous value. However, cater for the
possibility of a another CBR change that gets caught up in the PSB+ anyway.

Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
---
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
index 3d2255f284f4..5eb792cc5d3a 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
@@ -1975,6 +1975,13 @@ static int intel_pt_walk_trace(struct intel_pt_decoder *decoder)
goto next;
if (err)
return err;
+ /*
+ * PSB+ CBR will not have changed but cater for the
+ * possibility of another CBR change that gets caught up
+ * in the PSB+.
+ */
+ if (decoder->cbr != decoder->cbr_seen)
+ return 0;
break;

case INTEL_PT_PIP:
--
2.17.1