perf intel-pt: Fix state setting when receiving overflow (OVF) packet
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 10 Dec 2021 16:23:00 +0000 (18:23 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 11 Dec 2021 11:19:47 +0000 (08:19 -0300)
commitc79ee2b2160909889df67c8801352d3e69d43a1a
tree797074aba9b88035ba1c47738434e6939dda93eb
parent4c761d805bb2d2ead1b9baaba75496152b394c80
perf intel-pt: Fix state setting when receiving overflow (OVF) packet

An overflow (OVF packet) is treated as an error because it represents a
loss of trace data, but there is no loss of synchronization, so the packet
state should be INTEL_PT_STATE_IN_SYNC not INTEL_PT_STATE_ERR_RESYNC.

To support that, some additional variables must be reset, and the FUP
packet that may follow OVF is treated as an FUP event.

Fixes: f4aa081949e7b6 ("perf tools: Add Intel PT decoder")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org # v5.15+
Link: https://lore.kernel.org/r/20211210162303.2288710-5-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c