WPR How-to Topics

This section describes how to perform procedures by using Windows Performance Recorder (WPR) UI. For information about how to start a recording from the command line, see WPR Command-Line Options.

Start a Recording

  1. On the Start screen, click Windows Performance Recorder.

  2. To run the default profile, click Start. Or, to view and use other profiles, click More options.

    1. In the Select profiles for performance recording box, select at least one profile.

    2. You can optionally add a custom profile. To do so, click Add Profiles, navigate to the profile that you want, and then click Open. Under Custom measurements, select the profile.

    3. From the Performance scenario drop-down list, select the scenario that you want. Unless the recording is for an on/off scenario, select General.

    4. You can optionally record at the light detail level. (Verbose is the default.level.) To do so, select Light in the Detail level drop-down list.

    5. To log the recording to a file, select File in the Logging mode drop-down list. Memory is the default logging mode, except for on/off transition logs, which must be logged to a file.

      Caution   For longer recordings, select Memory. When you select File, the file can grow very large because the only limitation to the file size is the available disk space. Windows Performance Analyzer (WPA) cannot analyze extremely large files.

  3. Click Start to begin recording, or click Cancel to end without recording.

Note   If you try to start a recording in WPR during the time that another WPR initiated session is running, WPR will detect a conflict and prompt you with the following query:

An existing session is already running. Click OK to stop the running session and start the selected profile(s) or Cancel to abort the operation.

To stop the current session, click OK. WPR will start to record. Note that this action can impact the application that started the cancelled session. To allow the current session to continue, click Cancel. In this case, WPR does not start a recording and the other application is not affected.

View a Recording Status

When you start a recording by using the WPR user interface (UI), the recording status immediately displays on the WPR screen. If you start a recording by using the WPR command-line interface, you can view the recording status by using either of the following methods:

  • In the command prompt window, type wpr –status. For more information about this command, see WPR Command-Line Options.

  • Open the WPR UI. The status of the recording that you started from the WPR command line will display.

Note   WPR can only display a recording’s status if the recording is started by WPR. It cannot display recording status for recordings that are started by Xperf or other applications.

The recording status displays the following information:

  • Recording Time: This is the length of time that the recording has been running.

  • Buffer: This is the buffer size that the recording is using. It is displayed in both MB and percentage of available pooled memory.

  • Events dropped: The number of lost events since the recording was started. For more information about this issue, see Avoid Lost Events.

Stop a Recording

  1. On the WPR screen, click Save. (If you click Cancel, no recording data is saved.)

  2. Browse to the location to which you want to save the recording file.

  3. Enter a description of the problem for which you created the recording.

  4. Click Save and then click OK.

    If events have been lost, a warning will display. See Avoid Lost Events for guidance about how to avoid this problem.

Security

Recordings can contain personally identifiable or security-related information. This includes paths to files that the recording accesses, or registry access and process names. Be cautious when you share recording files.

Add or Remove a Custom Recording Profile

  1. On the WPR screen, if the options are hidden, click More options.

  2. Click Add Profiles.

  3. Navigate to the location that contains the profile files, select the .wprp file, and then click Open. WPR will validate the schema of the .wprp file before it is added to the profile.

  4. Repeat steps 2 and 3 to add additional profiles. You can use up to 64 profiles for a single recording.

The profiles that you added will display under Custom measurements.

To remove a recording profile

  1. On the WPR screen, if the options are hidden, click More options.

  2. Right-click the custom profile that you want to remove and then click Remove Profile.

The Remove Profile button is visible only if custom profiles are present. You can only remove custom profiles: you cannot remove built-in profiles.

Change the Performance Scenario

  1. On the WPR screen, if the options are hidden, click More options.

  2. In the Performance scenario drop-down list, select the scenario that you want. The default is General.

Change the Detail Level

  1. On the WPR screen, if the options are hidden, click More options.

  2. In the Detail level drop-down list, select the detail level that you want. Verbose is the default level.

Change the Logging Mode

  1. Click Windows Performance Recorder on the Windows 8 Start screen.

  2. Click More options.

  3. Select the logging mode from the Logging mode drop-down list. The default mode is Memory.

Caution   For longer recordings, select Memory. When you select File, the file can grow very large because the available disk space is the only limitation to file size. If the file is too large, you might not be able to analyze it in Windows Performance Analyzer (WPA).

Author a Custom Recording Profile

You can author custom profiles in an XML file that has a .wprp extension. See Recording Profile XML Reference for the complete schema and reference information. See Authoring Recording Profiles for more detailed information about authoring recording profiles.

To author a custom recording profile

  1. In an XML editor, create a new XML file.

  2. Enter collector definitions. For more information, see 1. Collector Definitions.

  3. Enter system and event provider definitions. For more information, see 2. System and Event Provider Definitions.

Note   If you want the custom profile to stop and roll back if some providers do not start, set the Strict attribute to "true". For more information about this option, see Strict Providers.

  1. Enter profile definitions. For more information, see 3. Profile Definitions.

  2. Save the file with a .wprp extension.

You can define derived collectors, providers, and profiles that inherit from a base version that you define earlier in the same file or in another file. For more information about this option, see Inheritance.

Avoid Lost Events

Some applications generate so many events that Event Tracing for Windows (ETW) cannot keep up with the logging frequency. This problem manifests as lost events in the recordings. The problem can lead to analysis difficulties or erroneous conclusions because of incomplete data.

Note   By default, WPR uses paged memory for buffers. To set WPR to use non-paged memory for buffers, set the NonPagedMemory attribute to true for the provider. For more information about how to create a custom profile, see Authoring Recording Profiles and 2. System and Event Provider Definitions.

You can help prevent WPR from losing ETW buffers or events in the following ways:

  • Use larger buffers to enable more efficient disk I/O when WPR writes the buffers to disk.

  • Count requests for the data collection the first time that you use a particular buffer configuration on a computer.

  • Use the command-line recordTempTo option to record to a different location than the default.

  • Increase the number of buffers.

  • Simplify the scenario that you are testing, or select fewer profiles.

  • Free disk space on the system drive.

  • Use advanced hardware to collect the data; for example, use a disk subsystem that has higher throughput. This is the last option to consider. You can usually avoid losing events by carefully selecting the providers to enable and the buffers to use.

Windows Performance Recorder

WPR Common Scenarios

WPR Features

Sessions

Sessions (Windows Drivers)