The VeriStand engine now includes enhanced tracing capabilities to assist with debugging and analyzing system performance.

These tracing capabilities use the Perfetto Tracing SDK. The VeriStand Engine can be configured to generate tracing events for many of its internal operations. When tracing is enabled, the engine starts the Perfetto tracing system within its process and records these events. This integration allows users to leverage Perfetto's powerful tracing capabilities to analyze and monitor the system's real-time performance and behavior.

Note Enabling tracing might incur additional overhead. Impact varies with your configuration. Enable tracing only when necessary for debugging or performance analysis.

Enabling and Disabling Tracing in VeriStand

To enable or disable tracing in VeriStand, complete the following steps:
  1. In the VeriStand Editor, click Tool Launcher » Manage Targets.
  2. Select the desired targets in the Manage Targets tab of the Tool window.
  3. Check Configure Tracing.
  4. The Configure Tracing dialog shows whether tracing is enabled for the selected target.
  5. Click Enable or Disable to enable or disable tracing for the selected target.
Note If the selected target is unreachable, a connection error message displays.
Note When tracing is enabled, VeriStand does not automatically redeploy the system definition file after a reboot. This applies even when RT Target Reboot Action is set to Run System Definition. The RT target waits for a new deployment from the host.

Trace Generation

Tracing begins when the system definition file deploys. Tracing ends when the system definition file is undeployed. The trace file is written to /home/lvuser.

Trace Analysis

To begin trace analysis, copy the trace file to your local computer, then load the trace into https://ui.perfetto.dev/.

Note The Perfetto UI functions entirely within the browser without server interaction, enabling offline trace analysis. If you prefer to view traces in an offline setup, you can compile and host a standalone, air-gapped version. Refer to Perfetto UI Development for more information.

Modifying Trace Buffer Size

By default, the buffer size is 512 MB. To modify the buffer size, add the following trackEventBufferSizeInKB setting under the [VSPerfetto] section in the INI file located at /c/ni-rt/NIVeriStand/NI VeriStand.ini.

For Example, to set the buffer size to 100 MB, add the following lines:

``` ini
[VSPerfetto]
trackEventBufferSizeInKB=102400
```
Note Reduce the buffer size for cRIO-903x series targets to avoid running out of memory.