OSDN Git Service

perf intel-pt: Improve sample timestamp
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 26 May 2017 08:17:03 +0000 (11:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:07:57 +0000 (15:07 -0700)
commit3e6837f1f414ea98f574abc31f04a1a5acb68203
tree51b7b3266520be9e9c3e69ef2b8b6f5718c93c44
parentd3503ef1a6147be68f6208af01a9f81b11cc4877
perf intel-pt: Improve sample timestamp

commit 3f04d98e972b59706bd43d6cc75efac91f8fba50 upstream.

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. Improve that situation by using the pkt_state to
determine when to use the current or previous timestamp.

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