As a sports fan, I generally prefer to watch most events at home, rather than at the stadium. One of the main reasons for this is that the TV coverage will always go to an instant replay of any interesting incident that occurred… a goal, a touchdown, a wicket, depending on your sport of preference. This gives the viewer a better understanding of how the goal was scored, by being able to analyze what happened just before the goal, to see what enabled it to occur.
For a software developer, trace provides a similar instant replay, and most Arm systems have some capability to generate such trace data. It can be a powerful debugging tool to help understand what the target was doing, for example, just before an abort was taken. It can be used to ensure that validation and verification code has been executed completely and correctly. It can even be used for low level performance analysis, counting how many cycles were taken to handle a interrupt.
Broadly, you can think of trace in two forms, that is hardware trace, a complete history of every instruction (and possibly every data access) that was executed, and instrumented trace, which is where the user has annotated their program to output trace messages. The CoreSight Embedded Trace Macrocell (ETM) is the principal source of hardware trace, sitting alongside an Arm processor inside a device, monitoring its activity without any changes to the source code. Conversely ITMs and STMs are used as a printf style resource, the output of which is captured in the trace stream. With any combination of these, your target can generate a large amount of trace data, which leads us to the problem of collecting the data.
Building on the success of the second-generation DSTREAM-ST, our latest offering, DSTREAM-PT ('PT' refers to the parallel trace capabilities of the unit) gives users the bandwidth to gather trace data from a myriad of sources on a device, with support for up to 32-bit wide parallel trace ports on the target, and a huge 8GB trace buffer to store the data, enabling use cases not previously feasible with DSTREAM-ST.
For example, you may have a Cortex-R52 based platform, and for usage in an automotive application, you must verify every instruction and data access that occurs. Tracing of data accesses is both bandwidth intensive and generates a large volume of trace data. Typical on-chip solutions do not have a large enough buffer to hold a meaningful amount of trace history; narrow off-chip trace ports routinely overflow when facing this volume of data. DSTREAM-PT addresses both issues.
Used in conjunction with the Arm Development Studio, DSTREAM-PT can decode and display all the trace data generated, automatically sorting by sources. When a global timestamp is provided, the trace views from each source can be synchronized together to get a complete picture of everything occurring at a particular point in time. The below illustrates trace from a single target containing both Cortex-A7 and Cortex-M4 processors.
Furthermore, the Streamline performance analyzer can consume this trace data, giving a visual representation of the program flow, highlighting the areas of your code where the most time is spent, enabling you to focus your optimization efforts to where the biggest benefits will be had.
Connection to your development board is through a single MIPI-60 connector. Also provided are adapters to other common pinouts, such as Mictor and CoreSight connectors. If debug signals are not routed through the trace connector, you can connect the DSTREAM-ST directly to the target, independent of the trace probe. The probe can automatically calibrate to your target, implemented in hardware within the probe, ensuring the most reliable trace capture.
DSTREAM-PT will be available from April 2019 and will be supported by subsequent releases of Development Studio. When available, it will be the highest performance debug and trace solution that Arm offers. Note that the first generation DSTREAM is no longer being manufactured, and so will not be available once existing stock is depleted. DSTREAM-PT will support all targets supported by DSTREAM.
Learn more about DSTREAM-PT