Adrian Hunter 3bccbe20f6 perf intel-pt: Fix MTC timestamp calculation for large MTC periods
The MTC packet provides a 8-bit slice of CTC which is related to TSC by
the TMA packet, however the TMA packet only provides the lower 16 bits
of CTC.  If mtc_shift > 8 then some of the MTC bits are not in the CTC
provided by the TMA packet. Fix-up the last_mtc calculated from the TMA
packet by copying the missing bits from the current MTC assuming the
least difference between the two, and that the current MTC comes after
last_mtc.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org # v4.3+
Link: http://lkml.kernel.org/r/1475062896-22274-2-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-10-05 08:15:58 -03:00
..
2015-05-27 12:21:43 -03:00
2016-07-18 19:42:47 -03:00
2016-07-18 19:42:47 -03:00
2016-06-28 10:54:56 -03:00
2016-07-12 15:19:47 -03:00
2016-07-12 15:19:47 -03:00
2016-09-20 16:20:21 -03:00
2016-10-03 11:24:13 -03:00
2016-10-03 11:24:13 -03:00
2015-08-21 11:34:10 -03:00
2016-10-03 11:24:13 -03:00
2016-06-15 10:35:27 -03:00
2016-06-15 10:35:27 -03:00
2015-05-05 18:13:22 -03:00
2015-05-05 18:13:22 -03:00
2016-07-12 15:19:55 -03:00
2016-07-12 15:19:55 -03:00
2016-07-12 15:19:55 -03:00
2016-10-03 11:24:13 -03:00
2016-08-23 15:37:33 -03:00
2016-09-29 11:17:01 -03:00
2016-09-29 11:17:01 -03:00
2016-10-03 11:24:13 -03:00
2016-03-31 10:52:24 -03:00
2016-04-28 09:58:58 -03:00
2016-03-23 12:32:31 -03:00
2014-05-01 21:22:39 +02:00
2015-05-29 12:43:44 -03:00