Recording large TRD files

19-Dec-2024

To effectively record large Trace Recording Data (TRD) files via winIDEA Analyzer you must understand potential causes and their solutions.

Trace data is captured by an on-chip trace engine, which stores it in an on-chip buffer or streams it through a trace port to the debugger. Trace Recording Data (TRD) files store this raw trace data, enabling the analysis of a system's behavior during runtime.


Possible causes

Internal and External Transfer Rates

The internal trace engine may capture data at speeds of 150 MB/s, but if the external interface can only handle 30 MB/s, the internal FIFO will eventually overflow, halting the tracing process. Data transferred to the debugger via parallel trace lines or a high-speed Aurora interface is stored in the debugger's main memory and then retransmitted over Ethernet or a fast USB interface.


PC Data Handling

On a modern PC, the debugger can transmit data via a USB 3.0 interface at more than 400 MB/s. The PC stores this data in memory before writing it to disk. If the disk cannot keep up with sustained high speeds (e.g., a slow mechanical drive), winIDEA will report an error. High-speed NVMe drives are recommended.

 

Possible solutions

Follow these recommendations to minimize errors and bottlenecks.


Prevent FIFO overflow
  • Make sure no trace FIFO overflow errors occur, as these are often caused by the CPU executing tight loop code. Check Buffer (FIFO) overflows for more information.
  • Verify that the external trace interface can empty the trace FIFOs quickly enough.


Optimize Data Storage
  • Use the ISYSTEM_TEMP variable to redirect data to a fast-access disk or folder.
  • Redirect TRD file storage to a non-system SSD if multiple SSDs with similar performance are available.
  • Avoid using encryption software like BitLocker. If necessary, exclude the folder where TRDs are stored.
  • Disable antivirus or antispyware checks on the folder where winIDEA stores temporary data.
  • Maintain sufficient free disk space. The Profiler can warn you about low disk space, and you can set the threshold in the Analyzer Options dialog. 
  • Defragment mechanical drives regularly, if still in use.


Minimize Data Recording

Record only the data required to catch a rare event or confirm access.

For example, avoid recording a 100 GB file if the event of interest occurs in 100 µs and can be captured using a proper trace trigger or qualifier.


Handle Profiler Data
Ensure sufficient free space in the temporary folder.
When using the Profiler, winIDEA saves incoming raw data and immediately begins parallel analysis across multiple cores. Temporary data generated during this process can be up to five times the size of the raw data. Temporary files are automatically deleted after analysis, leaving only the analyzed TRD file.






Was this answer helpful?