WPT: Using WPT (WPRUI or WPR) to enable Storport ETW Performance Logging

Applies to:

Windows Server 2008 R2

Windows 7

Does not apply to:

Windows Server 2012 R2

Windows 8.1

Windows Server 2012

Windows 8.0

 

In the previous post WPT: Using WPT (Xperf) to enable Storport ETW Performance Logging I went thru enabling Storport ETW performance tracing using xperf.  In this post, I will go thru enabling this same tracing as part of WPRUI or WPR.

This is the command that I need to convert into a xml file that ends with a .wprp extension.

xperf -start StorportPerformanceLogging -on Microsoft-Windows-Storport:0x8 -f StorportPerformance.etl -BufferSize 64 -MinBuffers 320 -MaxBuffers 320

I start out by looking at the example in WPRUI/WPR: Authoring Recording Profiles which seems daunting at first.

=======================Start of StorportPerformanceProfile.WPRP=======================

<?xml version="1.0" encoding="utf-8"?>

<!-- <Comment>
    xperf.exe -start StorportPerformanceLogging -on Microsoft-Windows-Storport:0x8 -BufferSize 64 -MinBuffers 320 -MaxBuffers 320
</Comment> -->

<WindowsPerformanceRecorder Version="1.0" Author="Yong Rhee" Copyright="Microsoft Corporation" Company="Microsoft Corporation">
  <Profiles>
    <EventCollector Id="EventCollector_StorportPerformanceLogging" Name="StorportPerformanceLogging">
      <BufferSize Value="64" />
      <Buffers Value="320" />
    </EventCollector>
    <EventProvider Id="EventProvider_Microsoft-Windows-Storport" Name="Microsoft-Windows-Storport">
      <Keywords>
        <Keyword Value="0x8" />
      </Keywords>
    </EventProvider>
    <Profile Id="StorportPerformanceProfile.Verbose.File" Name="StorportPerformanceProfile" Description="Storport Performance tracing" LoggingMode="File" DetailLevel="Verbose">
      <Collectors>
        <EventCollectorId Value="EventCollector_StorportPerformanceLogging">
          <EventProviders>
            <EventProviderId Value="EventProvider_Microsoft-Windows-Storport" />
          </EventProviders>
        </EventCollectorId>
      </Collectors>
    </Profile>
    <Profile Id="StorportPerformanceProfile.Verbose.Memory" Name="StorportPerformanceProfile" Description="Storport Performance tracing" Base="StorportPerformanceProfile.Verbose.File" LoggingMode="Memory" DetailLevel="Verbose" />
  </Profiles>
</WindowsPerformanceRecorder>

=======================End of StorportPerformanceProfile.WPRP=======================

Save the file in Notepad to c:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\ as

StorportPerformanceProfile.WPRP

image

image

Click on “Add Profiles…”

image

Select “StorportPerformanceProfile.wprp”

Click on “Open”

image

You will notice a new drop down named “Custom measurements” and our custom profile named “Storport Performance tracing”.

You could click on “Start” to start tracing.

 

Now, if you are a command line person, here are the steps to get Storport Performance tracing using WPR.exe:

image

To check to see what options are enabled in the StorportPerformanceProfile.wprp.

Type “wpr.exe -profiledetails StorportPerformanceProfile.wprp”without the double quotation marks and then press Enter.

image

Type “wpr.exe -profiles StorportPerformanceProfile.wprp” without the double quotation marks and then press Enter.

image

To start the Storport Performance trace

Type “wpr.exe -start StorportPerformanceProfile.wprp”without the double quotation marks and then press Enter.

image

To check on the statur or make sure that the new ETS (Event Trace Session) is running.

Type “wpr.exe -status”without the double quotation marks and then press Enter.

Reproduce the issue.

image

To stop the tracing.

Type “wpr.exe -cancel”without the double quotation marks and then press Enter.

Note:  If you change the .wprp to log to a file, you could type the following command:

image

Note 2:  If you are not logging to a file, and you try using the wpr –stop command, you will get the following error message:

image

More information:
WPRUI/WPR: Authoring Recording Profiles

WPRUI/WPR: Elements

WPRUI/WPR: WPRControlProfiles Schema

Windows Performance Analysis Developer Center

Related:

WPT: Using WPT (Xperf) to enable Storport ETW Performance Logging
https://blogs.technet.com/b/yongrhee/archive/2012/11/24/using-wpt-xperf-to-enable-storport-etw-performance-logging.aspx

WPT: WPR/Xperf: Capture high cpu, disk i/o, file, registry, networking, Private bytes, Virtual bytes, Paged Pool/Nonpaged pool and/or application slowness.
https://blogs.technet.com/b/yongrhee/archive/2012/11/23/wpr-xperf-capture-high-cpu-disk-i-o-file-registry-networking-private-bytes-virtual-bytes-paged-pool-nonpaged-pool-and-or-application-slowness.aspx

Installing the Windows Performance Toolkit v5.0 (WPRUI, WPR, Xperf)
https://blogs.technet.com/b/yongrhee/archive/2012/11/23/installing-the-windows-performance-toolkit-v5-0-wprui-wpr-xperf.aspx

XPerf versions
https://blogs.technet.com/b/yongrhee/archive/2009/09/08/xperf-versions.aspx

XPerf version 4.6 from July 2009
https://blogs.technet.com/b/yongrhee/archive/2009/10/14/xperf-version-4-6-from-july-2009.aspx

XP/Server2003:Xperf.exe, XPerfView.exe and XbootMgr.exe missing after installing the WPT (Windows Performance ToolKit)
https://blogs.technet.com/b/yongrhee/archive/2010/02/15/xp-server2003-xperf-exe-xperfview-exe-and-xbootmgr-exe-missing-after-installing-the-wpt-windows-performance-toolkit.aspx