summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2018-03-07 16:02:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-19 08:56:17 +0200
commit4039579fca382fe2d02d2ed78c98f626ed5392f5 (patch)
treed7647deac80e1a51fe59850858c617d77106358c /tools
parent0733facf3be9388f6f5c7eeba2754e57c22c138b (diff)
downloadlinux-stable-4039579fca382fe2d02d2ed78c98f626ed5392f5.tar.gz
linux-stable-4039579fca382fe2d02d2ed78c98f626ed5392f5.tar.bz2
linux-stable-4039579fca382fe2d02d2ed78c98f626ed5392f5.zip
perf intel-pt: Fix error recovery from missing TIP packet
commit 1c196a6c771c47a2faa63d38d913e03284f73a16 upstream. When a TIP packet is expected but there is a different packet, it is an error. However the unexpected packet might be something important like a TSC packet, so after the error, it is necessary to continue from there, rather than the next packet. That is achieved by setting pkt_step to zero. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1520431349-30689-4-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>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/intel-pt-decoder/intel-pt-decoder.c1
1 files changed, 1 insertions, 0 deletions
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 00f25f4b5f48..5e4d0bbafc8b 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
@@ -1616,6 +1616,7 @@ static int intel_pt_walk_fup_tip(struct intel_pt_decoder *decoder)
case INTEL_PT_PWRX:
intel_pt_log("ERROR: Missing TIP after FUP\n");
decoder->pkt_state = INTEL_PT_STATE_ERR3;
+ decoder->pkt_step = 0;
return -ENOENT;
case INTEL_PT_OVF: