View trace data in ROCm Optiq#

2025-12-10

7 min read time

Applies to Linux and Windows

ROCm Optiq provides a detailed view of a trace: a complete record of profiling data captured during an application run, including all event tracks, sample counters, and metadata. It captures what happened, when it happened, and often how long it took.

Traces contain event tracks and counter tracks:

  • An event track is a horizontal lane in the profiler’s timeline view that displays individual events such as API calls (for example, ROCm functions), kernel dispatches on the GPU, CPU function calls or other execution units. Each event is shown as a bar positioned according to its start and end timestamps, allowing you to visualize execution order and duration.

  • A counter track is a timeline track that displays the value of a metric that changes over time. These tracks show a sampled scalar value at a specific timestamp. Examples of information shown in a counter track include:

    • Processor frequency

    • Data traffic (bytes sent/received)

    • Memory usage

    • Hardware counter values

    • Thermal readings

Open a trace file#

ROCm Optiq supports the ROCm database formats (.db and .rpd).

Select File > Open to open a trace. You can also open files by dragging and dropping them onto the application window.

Note

If the trace file doesn’t open, the file may be in an unsupported format. Convert the file to a supported format (.db or .rpd) using ROCm scripts.

To generate profiling data in a compatible ROCpd format for ROCm Systems Profiler:

  1. Set the configuration environment to output data in the ROCpd format:

    export ROCPROFSYS_USE_ROCPD=ON  # enable rocpd output
    export ROCPROFSYS_USE_TRACE=OFF # disabling default Perfetto output
    
  2. Trace your application with call-stack sampling:

    rocprof-sys-sample -- ./your-application
    
  3. Instrument your application using a binary rewrite:

    rocprof-sys-instrument -o your-application.inst -- ./your-application
    rocprof-sys-run -- ./your-application.inst
    

View trace data#

Once you open a trace file, you can view its data from the System Topology View and the Timeline View.

System Topology View#

The System Topology View displays a hierarchical representation of the hardware or system components such as nodes, processes and the GPU queues, memory operations, threads, and more that belong to them.

../_images/topology.png
  • Click eye to show or hide tracks.

  • Click scroll to go to the track in the Timeline View.

Timeline View#

The Timeline View displays CPU and GPU activities, events, and performance metrics chronologically. You can:

  • Review events such as API calls, kernel dispatches, and more.

  • See performance counter data as charts displaying the data points.

  • Zoom, filter, and bookmark data for detailed analysis.

  • Correlate GPU workloads with in-application CPU events and performance with hardware resource usage, allowing for performance blockers to be easily identified and remedied.

The Timeline View has a Description area that describes a specific category of events or metrics within a profiling trace, and a Graph area where events and counter graphs are plotted:

../_images/timeline-details.png

Use the Timeline View#

Select a track#

Clicking in the Description area selects or deselects the track. When a track is selected, the details display in the Track Details pane.

Additionally, depending on the track type, the Event Table or Sample Table tabs in the Advanced Details section will be populated by the contents of the track.

../_images/selected-tracks.png
Select an event#

Clicking on an event in the Graph area selects or deselects an event. When selected, event details are displayed in the Event Details tab of the Advanced Details section.

Tip

When you hold the mouse pointer over a region with high-density events, the application displays the total number of events in each category.

Resize or reorder tracks#
  • Resize tracks by dragging the separator lines between tracks.

  • Reorder tracks by clicking and dragging grip on the left side of the Description area.

Histogram#

The Histogram shows an event-density visual representation of all visible tracks.

../_images/histogram.png

When the Timeline View is zoomed in, the area currently in view is highlighted on the Histogram. The highlighted area in the Histogram can be dragged to scroll the Timeline View.

Advanced Details#

The Advanced Details section provides an in-depth view of profiling data, enabling you to analyze performance metrics and event-specific information. This section provides an interface for multiple data perspectives, offering granular insights through these components:

  • Event Table: Displays all events within the selected tracks. You can refine your analysis by applying a time-range selection or executing customized SQL-like queries, ensuring targeted event exploration.

    ../_images/advanced.png
    • Group By: This drop-down groups the results by the selected column and displays the default aggregations shown in the Group Columns box. Click Submit to group the results.

    • Group Columns: Enter custom SQL aggregation statements. Click Submit to group the columns by your SQL statements.

    • Filter: Enter SQL-like statements to filter the data. For example, “min_duration > 2000” will filter all events shorter than 2000 ns. Click Submit to filter the data.

    Tip

    • Right-click on the column headers to show/hide columns.

    • Right-click on a table row and select Go to event to navigate to the Timeline View to the highlighted event.

    • Set a time range filter using the Timeline View to filter the rows to data contained within the selected time range.

  • Sample Table: Presents all performance counter data points associated with the selected tracks. Similar to the Event Table, it supports time-range selection and SQL-like query capabilities for detailed performance analysis.

  • Event Details: Shows extended information about the event that is not shown in the timeline or the Event Table. It shows raw database information such as timestamps, duration, associated queue/stream, correlation IDs and API method parameters. It also shows Flow and Call stack information, if available.

  • Track Details: Shows additional information about the track that is not visible on the timeline. It shows the node the track belongs to and its details, the process it belongs to, and the track type (thread, counter, queue, and so on).

  • Annotations: Displays user-created annotations, enabling easier navigation across critical points within large traces, enhancing collaboration and knowledge sharing. See Add an annotation for more info.

Search for events#

Search for events using the search box on the main Toolbar.

../_images/search.png
  • To search, type a search string and press Enter (search is case-insensitive).

  • Clicking on a row in the search results will bring the selected event into view on the Timeline View.

  • Clicking X clears the search results.

  • The search can match multiple substrings at once. Multiple search tokens must be surrounded by quotation marks without spaces (for example: “term1””term2”).