Commit 7eacca3e authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf tools: Add Intel PT support for decoding TRACESTOP packets

A TRACESTOP packet is produced when an Intel PT trace enters a defined
region of the address space at which point the tracing stops.

This patch just adds decoder support.

Support for specifying TRACESTOP regions is left until later.

For details refer to the June 2015 or later Intel 64 and IA-32
Architectures SDM Chapter 36 Intel Processor Trace.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1437150840-31811-25-git-send-email-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 0de802ab
...@@ -1572,6 +1572,10 @@ static int intel_pt_walk_trace(struct intel_pt_decoder *decoder) ...@@ -1572,6 +1572,10 @@ static int intel_pt_walk_trace(struct intel_pt_decoder *decoder)
return intel_pt_walk_fup_tip(decoder); return intel_pt_walk_fup_tip(decoder);
case INTEL_PT_TRACESTOP: case INTEL_PT_TRACESTOP:
decoder->pge = false;
decoder->continuous_period = false;
intel_pt_clear_tx_flags(decoder);
decoder->have_tma = false;
break; break;
case INTEL_PT_PSB: case INTEL_PT_PSB:
...@@ -1717,6 +1721,9 @@ static int intel_pt_walk_psb(struct intel_pt_decoder *decoder) ...@@ -1717,6 +1721,9 @@ static int intel_pt_walk_psb(struct intel_pt_decoder *decoder)
break; break;
case INTEL_PT_TRACESTOP: case INTEL_PT_TRACESTOP:
decoder->pge = false;
decoder->continuous_period = false;
intel_pt_clear_tx_flags(decoder);
case INTEL_PT_TNT: case INTEL_PT_TNT:
decoder->have_tma = false; decoder->have_tma = false;
intel_pt_log("ERROR: Unexpected packet\n"); intel_pt_log("ERROR: Unexpected packet\n");
...@@ -1819,6 +1826,10 @@ static int intel_pt_walk_to_ip(struct intel_pt_decoder *decoder) ...@@ -1819,6 +1826,10 @@ static int intel_pt_walk_to_ip(struct intel_pt_decoder *decoder)
return intel_pt_bug(decoder); return intel_pt_bug(decoder);
case INTEL_PT_TRACESTOP: case INTEL_PT_TRACESTOP:
decoder->pge = false;
decoder->continuous_period = false;
intel_pt_clear_tx_flags(decoder);
decoder->have_tma = false;
break; break;
case INTEL_PT_PSB: case INTEL_PT_PSB:
......
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