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 extractedSYSVIEW_*.txtdescription files, and the captured.SVDatrecording(s).build/profiling/output/holds your results: the converted Catapult JSON files, ready to open in a viewer.
Generate a Trace
Connect your target to the host with J-Link and make sure your application is running on it.
Start the capture-and-convert workflow:
./gradlew recordTraceOnDeviceWhen 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.When the console prints
Recording finished., the plugin converts the recording automatically. Your trace is the<name>-devtools.json(or-perfetto.json) file written tobuild/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)
Open a Chromium-based browser and press F12 to open the Developer Tools.
Optionally detach the Developer Tools into a standalone window for improved visibility.
Navigate to the Performance tab.
Drag and drop the JSON file into the Performance tab, or use the Load Profile button.
A trace loaded in the Chromium DevTools Performance tab.
Perfetto
Navigate to https://ui.perfetto.dev/ in any modern browser.
Click Open trace file and select the JSON file, or drag and drop it.
A trace loaded in the Perfetto UI.
