Commit a390435c authored by Adrian Hunter's avatar Adrian Hunter Committed by Stefan Bader

perf intel-pt: Fix error recovery from missing TIP packet

BugLink: http://bugs.launchpad.net/bugs/1768429

commit 1c196a6c 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: default avatarAdrian 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.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 4454dee4
...@@ -1492,6 +1492,7 @@ static int intel_pt_walk_fup_tip(struct intel_pt_decoder *decoder) ...@@ -1492,6 +1492,7 @@ static int intel_pt_walk_fup_tip(struct intel_pt_decoder *decoder)
case INTEL_PT_PSBEND: case INTEL_PT_PSBEND:
intel_pt_log("ERROR: Missing TIP after FUP\n"); intel_pt_log("ERROR: Missing TIP after FUP\n");
decoder->pkt_state = INTEL_PT_STATE_ERR3; decoder->pkt_state = INTEL_PT_STATE_ERR3;
decoder->pkt_step = 0;
return -ENOENT; return -ENOENT;
case INTEL_PT_OVF: case INTEL_PT_OVF:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment