alistair23-linux/tools
Adrian Hunter 61b6e08dc8 perf intel-pt: Fix improved sample timestamp
The decoder uses its current timestamp in samples. Usually that is a
timestamp that has already passed, but in some cases it is a timestamp
for a branch that the decoder is walking towards, and consequently
hasn't reached.

The intel_pt_sample_time() function decides which is which, but was not
handling TNT packets exactly correctly.

In the case of TNT, the timestamp applies to the first branch, so the
decoder must first walk to that branch.

That means intel_pt_sample_time() should return true for TNT, and this
patch makes that change. However, if the first branch is a non-taken
branch (i.e. a 'N'), then intel_pt_sample_time() needs to return false
for subsequent taken branches in the same TNT packet.

To handle that, introduce a new state INTEL_PT_STATE_TNT_CONT to
distinguish the cases.

Note that commit 3f04d98e97 ("perf intel-pt: Improve sample
timestamp") was also a stable fix and appears, for example, in v4.4
stable tree as commit a4ebb58fd124 ("perf intel-pt: Improve sample
timestamp").

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org # v4.4+
Fixes: 3f04d98e97 ("perf intel-pt: Improve sample timestamp")
Link: http://lkml.kernel.org/r/20190510124143.27054-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-05-16 14:17:23 -03:00
..
accounting
arch tools x86 uapi asm: Sync the pt_regs.h copy with the kernel sources 2019-05-15 16:36:46 -03:00
bpf tools: bpftool: fix infinite loop in map create 2019-04-25 17:20:06 -07:00
build tools build: Implement libzstd feature check, LIBZSTD_DIR and NO_LIBZSTD defines 2019-04-01 15:18:10 -03:00
cgroup
crypto
debugging
firewire
firmware
gpio
hv
iio
include tools include uapi: Sync sound/asound.h copy 2019-04-16 12:36:20 -03:00
io_uring tools/io_uring: remove IOCQE_FLAG_CACHEHIT 2019-04-08 10:48:50 -06:00
kvm/kvm_stat
laptop
leds
lib tools lib traceevent: Man pages for trace sequences APIs 2019-05-15 16:36:48 -03:00
memory-model tools/memory-model: Add support for synchronize_srcu_expedited() 2019-04-04 13:48:34 -07:00
nfsd
objtool Merge branch 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-06 11:39:17 -07:00
pci tools pci: Do not delete pcitest.sh in 'make clean' 2019-05-15 16:36:46 -03:00
pcmcia
perf perf intel-pt: Fix improved sample timestamp 2019-05-16 14:17:23 -03:00
power ACPICA: Rename nameseg length macro/define for clarity 2019-04-09 11:24:48 +02:00
scripts
spi
testing s390 updates for the 5.2 merge window 2019-05-06 16:42:54 -07:00
thermal/tmon
time
usb
virtio
vm tools/vm/slabinfo: clean up usage menu debug items 2019-03-05 21:07:20 -08:00
wmi
Makefile