[PATCH 10/37] perf intel-pt: Clear FUP flag on error

From: Adrian Hunter
Date: Fri May 19 2017 - 05:00:54 EST


Sometimes a FUP packet is associated with a TSX transaction and a flag is
set to indicate that. Ensure that flag is cleared on any error condition
because at that point the decoder can no longer assume it is correct.

Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
---
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
index dbcb07ebe813..7cdc8853fc1e 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
@@ -1946,6 +1946,8 @@ static int intel_pt_sync_ip(struct intel_pt_decoder *decoder)
{
int err;

+ decoder->set_fup_tx_flags = false;
+
if (!decoder->branch_enable) {
decoder->pkt_state = INTEL_PT_STATE_IN_SYNC;
decoder->overflow = false;
--
1.9.1