Examining connection manager driver traces for USB4™ devices

This article explores how to capture and review connection manager driver traces for USB4 devices.

Capture traces into ETL files

The BusesTrace.cmd script can be used to capture the traces of USB4 connection manager drivers and other USB drivers into ETL files. Tools such as Windows Performance Analyzer can be used to examine the traces in these ETL files.

The following steps capture the traces from the current boot session.

  1. Launch the BusesTrace.cmd script from an elevated command prompt.
  2. Choose the script menu items Start Tracing, USB4 components and Start Now to start the trace session.
  3. <Reproduce the problem>
  4. Follow the BusesTrace.cmd script prompt to hit any key to stop the trace session.

The following steps capture the traces from the beginning of the next boot session.

  1. Launch the BusesTrace.cmd script from an elevated command prompt.
  2. Choose the script menu items Start Tracing, USB4 components and Start From Next Boot Session to configure the trace session for next boot sessions.
  3. Reboot the system. The trace session starts after the reboot.
  4. <Reproduce the problem>
  5. Launch the BusesTrace.cmd script again from an elevated command prompt.
  6. Choose the script menu item Stop Boot Session Trace to stop the boot trace session and remove the boot trace session configuration for next boot sessions.

Examine traces in IFR circular memory buffer

The USB4 connection manager drivers implement Inflight Trace Recorder (IFR). This allows for the WPP trace messages to be written to a circular memory buffer and is always enabled. You do not need to enable a trace session before-hand. The traces messages from the IFR are accessible from a kernel debugger or kernel memory dump.

Use the kernel debugger commands to examine the traces.

!rcdrkd.rcdrlogdump Usb4HostRouter.sys
!rcdrkd.rcdrlogdump Usb4DeviceRouter.sys