aboutsummaryrefslogtreecommitdiffstats
path: root/decoder/source/trc_gen_elem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/source/trc_gen_elem.cpp')
-rw-r--r--decoder/source/trc_gen_elem.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/decoder/source/trc_gen_elem.cpp b/decoder/source/trc_gen_elem.cpp
index b3ec75f059d4..e1774203ebc5 100644
--- a/decoder/source/trc_gen_elem.cpp
+++ b/decoder/source/trc_gen_elem.cpp
@@ -46,6 +46,7 @@ static const char *s_elem_descs[][2] =
{"OCSD_GEN_TRC_ELEM_EO_TRACE","End of the available trace in the buffer."},
{"OCSD_GEN_TRC_ELEM_PE_CONTEXT","PE status update / change (arch, ctxtid, vmid etc)."},
{"OCSD_GEN_TRC_ELEM_INSTR_RANGE","Traced N consecutive instructions from addr (no intervening events or data elements), may have data assoc key"},
+ {"OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH","Traced N instructions in a range, but incomplete information as to program execution path from start to end of range"},
{"OCSD_GEN_TRC_ELEM_ADDR_NACC","Tracing in inaccessible memory area."},
{"OCSD_GEN_TRC_ELEM_ADDR_UNKNOWN","Tracing unknown address area."},
{"OCSD_GEN_TRC_ELEM_EXCEPTION","Exception"},
@@ -62,7 +63,8 @@ static const char *instr_type[] = {
"BR ",
"iBR ",
"ISB ",
- "DSB.DMB"
+ "DSB.DMB",
+ "WFI.WFE"
};
#define T_SIZE (sizeof(instr_type) / sizeof(const char *))
@@ -94,10 +96,20 @@ static const char *s_isa_str[] = {
"Unk" /**< ISA not yet known */
};
+static const char *s_unsync_reason[] = {
+ "undefined", // UNSYNC_UNKNOWN - unknown /undefined
+ "init-decoder", // UNSYNC_INIT_DECODER - decoder intialisation - start of trace.
+ "reset-decoder", // UNSYNC_RESET_DECODER - decoder reset.
+ "overflow", // UNSYNC_OVERFLOW - overflow packet - need to re-sync
+ "discard", // UNSYNC_DISCARD - specl trace discard - need to re-sync
+ "bad-packet", // UNSYNC_BAD_PACKET - bad packet at input - resync to restart.
+ "end-of-trace", // UNSYNC_EOT - end of trace info.
+};
+
void OcsdTraceElement::toString(std::string &str) const
{
std::ostringstream oss;
- int num_str = ((sizeof(s_elem_descs) / sizeof(const char *)) / 2);
+ int num_str = sizeof(s_elem_descs) / sizeof(s_elem_descs[0]);
int typeIdx = (int)this->elem_type;
if(typeIdx < num_str)
{
@@ -122,6 +134,11 @@ void OcsdTraceElement::toString(std::string &str) const
oss << " 0x" << std::hex << st_addr << " ";
break;
+ case OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH:
+ oss << "first 0x" << std::hex << st_addr << ":[next 0x" << en_addr << "] ";
+ oss << "num_i(" << std::dec << num_instr_range << ") ";
+ break;
+
case OCSD_GEN_TRC_ELEM_EXCEPTION:
if (excep_ret_addr == 1)
{
@@ -167,6 +184,12 @@ void OcsdTraceElement::toString(std::string &str) const
oss << " Numbered:" << std::dec << trace_event.ev_number << "; ";
break;
+ case OCSD_GEN_TRC_ELEM_EO_TRACE:
+ case OCSD_GEN_TRC_ELEM_NO_SYNC:
+ if (unsync_eot_info <= UNSYNC_EOT)
+ oss << " [" << s_unsync_reason[unsync_eot_info] << "]";
+ break;
+
default: break;
}
if(has_cc)