Recording a Trace

Once the plugin is installed, capture a live trace from the target and open the resulting file in a viewer. See Advanced Options for options such as converting an already-captured trace.

Workflow

The plugin captures a live session from your board and converts it into a viewer-ready trace. For a normal capture you run a single task; the individual tasks it chains together can also be run on their own (see Advanced Options and Tasks Reference).

It works inside two directories under the project’s build folder, each created by the task that writes to it:

  • build/profiling/input/ holds the inputs it produces or needs: the name lookup table, the extracted SYSVIEW_*.txt description files, and the captured .SVDat recording(s).

  • build/profiling/output/ holds your results: the converted Catapult JSON files, ready to open in a viewer.

Generate a Trace

  1. Connect your target to the host with J-Link and make sure your application is running on it.

  2. Start the capture-and-convert workflow:

    ./gradlew recordTraceOnDevice
    
  3. When the console prints Recording started... (duration: 15.0s), interact with the device: navigate the UI, trigger the animation, or run the scenario you want to profile. Everything the board does during this window is recorded.

  4. When the console prints Recording finished., the plugin converts the recording automatically. Your trace is the <name>-devtools.json (or -perfetto.json) file written to build/profiling/output/: open it as described in Open the Trace.

Note

The recording window is 15 seconds by default, so have your scenario ready before you launch the task. If 15 seconds is not enough, raise it with duration in the profiling extension. If you miss the window, simply run the task again.

Open the Trace

Chromium DevTools (default)

  1. Open a Chromium-based browser and press F12 to open the Developer Tools.

  2. Optionally detach the Developer Tools into a standalone window for improved visibility.

  3. Navigate to the Performance tab.

  4. Drag and drop the JSON file into the Performance tab, or use the Load Profile button.

Loading a trace in the Chromium DevTools Performance tab

A trace loaded in the Chromium DevTools Performance tab.

Perfetto

  1. Navigate to https://ui.perfetto.dev/ in any modern browser.

  2. Click Open trace file and select the JSON file, or drag and drop it.

Loading a trace in the Perfetto UI

A trace loaded in the Perfetto UI.