Good morning Maryem,
I am enlisting Mike's help on this one. When looking for support on CoreSight I suggest you CC the mailing list - there is a lot of knowledgeable people on there that can help you.
Mathieu
On 11 August 2017 at 08:57, Maryem Ayadi maryem.ayady@gmail.com wrote:
Hi mathieu,
I am working with the Opencsd library under linux in order to collect and decode the trace. I am using the Snapshots directory and I already decoded the trace packets from ETB_0 using ETM and captured from juno_r1_1 using the following command: ./tests/bin/linux64/dbg/trc_pkt_lister -ss_dir tests/snapshots/juno_r1_1/ -decode -src_name ETB_0 . This is an extract of the generic output packets:
Idx:65507; ID:15; OCSD_GEN_TRC_ELEM_ADDR_NACC( 0x40c5dc ) Idx:65508; ID:15; [0x95 0x3b ]; I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0x000000000040C4EC ~[0xEC] Idx:65510; ID:15; [0xfe ]; I_ATOM_F3 : Atom format 3.; NEE Idx:65510; ID:15; OCSD_GEN_TRC_ELEM_ADDR_NACC( 0x40c4ec ) Idx:65475; ID:10; OCSD_GEN_TRC_ELEM_EO_TRACE()
Now I want to generate trace data captured with ETM and coded in assembly language. Is that possible without using any debugger tool such as ARM's DS-5 debugger tool ? It would be helpful to send me any steps I should follow.
Best regards, Maryem Ayadi
Hi Maryem,
The output you have above is a mix of raw trace packets and the decoded generic output packets. i.e. I_ATOM_F3 is a raw trace packet from the ETMv4 protocol, OCSD_GEN_TRC_ELEM_ADDR_NACC( 0x40c4ec ) is the generic output packet from the decoder after processing a number of raw trace packets. In this case the OCSD_GEN_TRC_ELEM_ADDR_NACC( 0x40c4ec ) packet indicates that the decoder does not have the memory image for address 0x40c4ec and therefore cannot decode correctly.
If you are not using perf to capture trace data then I assume you are using some other custom method. e.g. sysfs scripts / programs. Once you have captured a buffer full of data, if you are not using a debugger such as DS-5 then it will be necessary to write a custom program or script to do the following:- a) using the OpenCSD library, create a decoder instance and use the API to pass in the ETM settings used during the trace capture session. b) further use the API to pass in any memory images of the traced code / kernel memory you wish to decode. c) Pass the trace data through the decoder instance and process the output generic packets that represent executed instruction ranges by passing them to a disassembly tool/library to create the output you require.
Best Regards
Mike
On 15 August 2017 at 15:56, Mathieu Poirier mathieu.poirier@linaro.org wrote:
Good morning Maryem,
I am enlisting Mike's help on this one. When looking for support on CoreSight I suggest you CC the mailing list - there is a lot of knowledgeable people on there that can help you.
Mathieu
On 11 August 2017 at 08:57, Maryem Ayadi maryem.ayady@gmail.com wrote:
Hi mathieu,
I am working with the Opencsd library under linux in order to collect and decode the trace. I am using the Snapshots directory and I already decoded the trace packets from ETB_0 using ETM and captured from juno_r1_1 using the following command: ./tests/bin/linux64/dbg/trc_pkt_lister -ss_dir tests/snapshots/juno_r1_1/ -decode -src_name ETB_0 . This is an extract of the generic output packets:
Idx:65507; ID:15; OCSD_GEN_TRC_ELEM_ADDR_NACC( 0x40c5dc ) Idx:65508; ID:15; [0x95 0x3b ]; I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0x000000000040C4EC ~[0xEC] Idx:65510; ID:15; [0xfe ]; I_ATOM_F3 : Atom format 3.; NEE Idx:65510; ID:15; OCSD_GEN_TRC_ELEM_ADDR_NACC( 0x40c4ec ) Idx:65475; ID:10; OCSD_GEN_TRC_ELEM_EO_TRACE()
Now I want to generate trace data captured with ETM and coded in assembly language. Is that possible without using any debugger tool such as ARM's DS-5 debugger tool ? It would be helpful to send me any steps I should follow.
Best regards, Maryem Ayadi