On Thu, May 18, 2017 at 5:09 AM, Mike Leach mike.leach@linaro.org wrote:
Hi Sebastian,
You should be further aware due to the way that the program flow trace works, all branches will result in a trace range, but not all trace ranges end in a branch. The input packets from the decoder [struct ocsd_generic_trace_elem @trc_gen_elem_types.h] contain the trace range as you have seen plus information on the last instruction in that range:- a) if it was a branch or not b) if it was executed (i.e. branch taken or not).
However this additional information is not transferred into the internal cs_etm_packet structure used in cs_etm__update_last_branch_rb()
So unless I have mis-interpreted what is required, to build a correctly formatted last branch record series, this additional information is going to be required - (we don't want none-branch ranges?), meaning an update in the cs-etm-decoder.c code is also required.
Thanks Mike for your suggestions, please see the implementation in https://lists.linaro.org/pipermail/coresight/2017-May/000601.html
Sebastian