Hello,
I have had some success streaming instruction trace to my Linux PC using RDDI (from ARM Development studio 2019) and a DStreamer ST. However I am also
having some problems:
1. Failure to stop trace cleanly
I have enabled streaming from an ETM attached to a Cortex-R5 core.
As described in the RDDI documentation, to stop streaming, I call StreamingTrace_Flush() and wait for
RDDI_STREAMING_TRACE_EVENT_TYPE_END_OF_DATA event.
Next i call StreamingTrace_Stop() which succeeds and then try StreamingTrace_Detach() which seems to fail with the following assert.
tpp.c:84: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed. Aborted (core dumped)
If i try to avoid calling StreamingTrace_{Detach, Stop} then Debug_CloseConn to the core never returns and i get a seg fault.
2. Raw trace does not start with A-SYNC bits
I do see A-SYNC bits later but my understanding was ETM always sends the A-SYNC bits first.
Cheers,
raj
On 12/09/2019 01:53, Raj Swaminathan - C wrote:
Hello,
I have had some success streaming instruction trace to my Linux PC using RDDI (from ARM Development studio 2019) and a DStreamer ST. However I am also
having some problems:
- Failure to stop trace cleanly
I have enabled streaming from an ETM attached to a Cortex-R5 core.
As described in the RDDI documentation, to stop streaming, I call /StreamingTrace_Flush()/ and wait for
/RDDI_STREAMING_TRACE_EVENT_TYPE_END_OF_DATA/ event.
Next i call /StreamingTrace_Stop()/ which succeeds and then try /StreamingTrace_Detach()/ which seems to fail with the following assert.
tpp.c:84: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed. Aborted (core dumped)
If i try to avoid calling StreamingTrace_{Detach, Stop} then Debug_CloseConn to the core never returns and i get a seg fault.
2. Raw trace does not start with A-SYNC bits
I do see A-SYNC bits later but my understanding was ETM always sends the A-SYNC bits first.
Cheers,
raj
Hi Raj,
This mailing list is for discussion and development of the driver and tools support for self-hosted trace on linux. For support with Arm DS you should contact Arm's support team at https://developer.arm.com/support or post on https://community.arm.com/developer/tools-software/tools.
However in this case, I might be able to offer a couple of hints:
1. Do you call StreamingTrace_WaitForEvent() between StreamingTrace_Stop() and StreamingTrace_Detach()? You need to do this for each buffer submitted with StreamingTrace_SubmitEventBuffer() to transfer ownership of the data buffers back to your code.
There is an example program at https://github.com/ARM-software/coresight-wire-protocol/blob/master/rddi_str... which shows how to use this interface.
2. To ensure you capture the start of trace, you should start capture first, then enable the other CoreSight devices, and finally start the ETM. At the end of trace, you should stop the ETM first, then stop the capture.
Regards
Rob
Hi Robert,
Appreciate the pointers and the link. I was able to resolve 1) based on your suggestions However as a note, i did have to submit buffers first before I start trace (unlike in the program) or else StreamingTrace_Start() returned an error. This may be something new with recent versions of Development Studio.
For my issue 2), even after following your suggestions, I don't see the A-SYNC bits arrive at the top. I may be doing other things wrong here because im running into decoding issues with OpenCSD. I will write up a follow up help request on this.
Cheers, raj
________________________________ From: Robert Walker robert.walker@arm.com Sent: Thursday, September 12, 2019 1:13 AM To: Raj Swaminathan - C; coresight@lists.linaro.org Subject: [EXTERNAL] Re: Questions on trace capture via RDDI
On 12/09/2019 01:53, Raj Swaminathan - C wrote:
Hello,
I have had some success streaming instruction trace to my Linux PC using RDDI (from ARM Development studio 2019) and a DStreamer ST. However I am also
having some problems:
1. Failure to stop trace cleanly
I have enabled streaming from an ETM attached to a Cortex-R5 core.
As described in the RDDI documentation, to stop streaming, I call StreamingTrace_Flush() and wait for
RDDI_STREAMING_TRACE_EVENT_TYPE_END_OF_DATA event.
Next i call StreamingTrace_Stop() which succeeds and then try StreamingTrace_Detach() which seems to fail with the following assert.
tpp.c:84: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed. Aborted (core dumped)
If i try to avoid calling StreamingTrace_{Detach, Stop} then Debug_CloseConn to the core never returns and i get a seg fault.
2. Raw trace does not start with A-SYNC bits
I do see A-SYNC bits later but my understanding was ETM always sends the A-SYNC bits first.
Cheers,
raj
Hi Raj,
This mailing list is for discussion and development of the driver and tools support for self-hosted trace on linux. For support with Arm DS you should contact Arm's support team at https://developer.arm.com/supporthttps://urldefense.proofpoint.com/v2/url?u=https-3A__developer.arm.com_support&d=DwMD-g&c=oabj6cKx-cayrvsTA0R67S_f77lckZDNuNOZqiS4cjA&r=b-yBJNgq9KntqybDcUIYeYXnWt0NWqno8NaiNbG19Fk&m=b8MAhmhNx5j__Dem6JHSPkKIxayflffeat2vgxniKdU&s=vZeNC9T9ezaACnJoJr80I4lmYGWH8pLa5odICgGiTcU&e= or post on https://community.arm.com/developer/tools-software/toolshttps://urldefense.proofpoint.com/v2/url?u=https-3A__community.arm.com_developer_tools-2Dsoftware_tools&d=DwMD-g&c=oabj6cKx-cayrvsTA0R67S_f77lckZDNuNOZqiS4cjA&r=b-yBJNgq9KntqybDcUIYeYXnWt0NWqno8NaiNbG19Fk&m=b8MAhmhNx5j__Dem6JHSPkKIxayflffeat2vgxniKdU&s=qUF-XA5p9ahzf_vL2twxrIyolWvMPRSgPM0RlS6b00g&e=.
However in this case, I might be able to offer a couple of hints:
1. Do you call StreamingTrace_WaitForEvent() between StreamingTrace_Stop() and StreamingTrace_Detach()? You need to do this for each buffer submitted with StreamingTrace_SubmitEventBuffer() to transfer ownership of the data buffers back to your code.
There is an example program at https://github.com/ARM-software/coresight-wire-protocol/blob/master/rddi_str...https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ARM-2Dsoftware_coresight-2Dwire-2Dprotocol_blob_master_rddi-5Fstreaming-5Ftrace_streaming-5Ftrace-5Fcapture_main.c&d=DwMD-g&c=oabj6cKx-cayrvsTA0R67S_f77lckZDNuNOZqiS4cjA&r=b-yBJNgq9KntqybDcUIYeYXnWt0NWqno8NaiNbG19Fk&m=b8MAhmhNx5j__Dem6JHSPkKIxayflffeat2vgxniKdU&s=449MKUiAot7-0QXd-RMocaBTP_FDeNkX8Ivmba38_O8&e= which shows how to use this interface.
2. To ensure you capture the start of trace, you should start capture first, then enable the other CoreSight devices, and finally start the ETM. At the end of trace, you should stop the ETM first, then stop the capture.
Regards
Rob
Hi Raj,
Questions about ARM debug products should be directed to ARM support.
This list deals with questions about CoreSight technology and the implementation of self hosted solutions on the linux platform including drivers, perf and decode (OpenCSD).
Thanks
Mike
On Thu, 12 Sep 2019 at 01:54, Raj Swaminathan - C RSwaminathan@blueorigin.com wrote:
Hello,
I have had some success streaming instruction trace to my Linux PC using RDDI (from ARM Development studio 2019) and a DStreamer ST. However I am also
having some problems:
- Failure to stop trace cleanly
I have enabled streaming from an ETM attached to a Cortex-R5 core.
As described in the RDDI documentation, to stop streaming, I call StreamingTrace_Flush() and wait for
RDDI_STREAMING_TRACE_EVENT_TYPE_END_OF_DATA event.
Next i call StreamingTrace_Stop() which succeeds and then try StreamingTrace_Detach() which seems to fail with the following assert.
tpp.c:84: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed. Aborted (core dumped)
If i try to avoid calling StreamingTrace_{Detach, Stop} then Debug_CloseConn to the core never returns and i get a seg fault.
- Raw trace does not start with A-SYNC bits
I do see A-SYNC bits later but my understanding was ETM always sends the A-SYNC bits first.
Cheers,
raj
CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight