On Mon, Oct 08, 2018 at 02:15:35PM +0100, Mike Leach wrote:
[...]
At my side, I do see the exception number is mess from the dumped elements as below; you also could check complete dump log from [1], which is a big size log file (~764MB).
elem: elem_type=6 last_i_type=0 last_i_subtype=0 exception_number=0 exc=1 exc_ret=0 elem: elem_type=6 last_i_type=0 last_i_subtype=0 exception_number=0 exc=1 exc_ret=0 elem: elem_type=6 last_i_type=0 last_i_subtype=0 exception_number=0 exc=1 exc_ret=0 elem: elem_type=6 last_i_type=0 last_i_subtype=0 exception_number=0 exc=1 exc_ret=0 elem: elem_type=6 last_i_type=0 last_i_subtype=0 exception_number=0 exc=1 exc_ret=0 elem: elem_type=6 last_i_type=0 last_i_subtype=0 exception_number=0 exc=1 exc_ret=0 elem: elem_type=4 last_i_type=0 last_i_subtype=0 exception_number=0 exc=1 exc_ret=0 elem: elem_type=9 last_i_type=0 last_i_subtype=0 exception_number=0 exc=1 exc_ret=1 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=15 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=13 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=33 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=13 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=33 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=13 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=33 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=13 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=7 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=13 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=33 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=13 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=7 exc=0 exc_ret=0 elem: elem_type=5 last_i_type=1 last_i_subtype=0 exception_number=13 exc=0 exc_ret=0
Exception number in the packet is only valid if the element type is an exception. It is part of this structure within the input packet:-
typedef struct _ocsd_generic_trace_elem { ... //! packet specific payloads union { uint32_t exception_number; /**< exception number for exception type packets */ trace_event_t trace_event; /**< Trace event - trigger etc */ trace_on_reason_t trace_on_reason; /**< reason for the trace on packet */ ocsd_swt_info_t sw_trace_info; /**< software trace packet info */ uint32_t num_instr_range; /**< number of instructions covered by range packet (for T32 this cannot be calculated from en-st/i_size) */ }; ... }
This reduces the bytes needed for the output packet by overlapping mutually exclusive features.
Ah, sorry for noise. I go through all elem_type=8, then I can see exception numbers are (2, 11, 14). Exception 11 ("Inst Fault") also is reasonable for me if connect with kernel's insn_emulation module.
leoy@leoy-ThinkPad-X240s:~$ grep elem_type=8 /tmp/out2.log | sort -t' ' -u elem: elem_type=8 last_i_type=0 last_i_subtype=0 exception_number=14 exc=1 exc_ret=0 elem: elem_type=8 last_i_type=0 last_i_subtype=0 exception_number=2 exc=1 exc_ret=0 elem: elem_type=8 last_i_type=1 last_i_subtype=0 exception_number=14 exc=1 exc_ret=0 elem: elem_type=8 last_i_type=1 last_i_subtype=1 exception_number=11 exc=1 exc_ret=0
Thanks a lot for helping, will firstly prepare patches for A64 related fixing based on the discussion.
Thanks, Leo Yan