perf intel-pt: Cater for CBR change in PSB+
authorAdrian Hunter <adrian.hunter@intel.com>
Sat, 22 Jun 2019 09:32:43 +0000 (12:32 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 25 Jun 2019 11:47:10 +0000 (08:47 -0300)
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@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190622093248.581-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c

index 3d2255f284f477d8225a66587f0057a05a4dae0a..5eb792cc5d3ab1e7ed4ab21928cf16ea5a6279c7 100644 (file)
@@ -1975,6 +1975,13 @@ next:
                                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: