]> git.baikalelectronics.ru Git - kernel.git/commit
perf intel-pt: Do not use TSC packets for calculating CPU cycles to TSC
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 26 May 2017 08:17:37 +0000 (11:17 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 30 Jun 2017 14:50:55 +0000 (11:50 -0300)
commite38df87885ad947f9a1320fb1718afd0a33d66a8
treef2d180d2fbf0f10a84d38b1bbeaa7413de7a0a3a
parentb7a72a99946c655b164a37ee310e09122f7f0f2a
perf intel-pt: Do not use TSC packets for calculating CPU cycles to TSC

CBR (core-to-bus ratio) packets provide an indication of CPU frequency. A
more accurate measure can be made by counting the cycles (given by CYC
packets) in between other timing packets (either MTC or TSC). Using TSC
packets has at least 2 issues: 1) timing might have stopped (e.g. mwait) or
2) TSC packets within PSB+ might slip past CYC packets. For now, simply do
not use TSC packets for calculating CPU cycles to TSC. That leaves the case
where 2 MTC packets are used, otherwise falling back to the CBR value.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1495786658-18063-37-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c