Using Windows Performance Analyzer to analyze Modern Standby issues
The Windows Performance Analyzer (WPA) displays traces of system activity in a graphical format. WPA is used for many Windows performance and debugging scenarios, and is the second-level triage tool for Modern Standby issues that cannot be resolved by using SleepStudy. WPA presents a graphical format of a trace file that contains events collected during a Modern Standby session.
Watch this video to learn how to use WPA to analyze traces of Modern Standby sessions.
This video shows how to use the Platform Idle State graph and PDC Resiliency Activity graph to identify the cause of software activity that prevents the hardware platform from spending sufficient time in the DRIPS state.
Watch this video to learn how to use the Platform Idle State graph and Device Dstate graph to track down a hardware device that causes the hardware platform to spend too little time in the DRIPS state.
For more information about the Platform Idle State graph, see the «Common WPA graphs for connected standby power management» section below. For more information about the PDC Resiliency Activity graph and Device Dstate graph, see the «View a WPA trace» section below.
WPA is available in the Windows Assessment and Deployment Kit (Windows ADK) download package and includes scripts and documentation for Modern Standby analysis.
The remainder of this section refers to the documents and scripts that are provided in this download.
Capture and view a WPA trace for Modern Standby diagnostics
Trace capture is the key diagnostic method that is used to debug issues that are observed during Modern Standby through SleepStudy or other tools. A trace contains detailed information about system platform states, device states, software activity, CPU utilization, memory utilization, and other system events. Events that are captured in a trace show exactly what happened during Modern Standby and any problems that resulted.
Capture a WPA trace
Capture a trace of at least one hour of Modern Standby to observe trends and averages.
Use the following method to capture a WPA trace using the Windows Performance Recorder (WPR) with the Power profile:
- Install the Windows Performance Toolkit (WPT).
- Open an elevated command prompt and navigate to the WPT install location.
- To start the trace, run: wpr -start Power
- While recording, put the system into Modern Standby. Wait for at least one hour, then wake up the system.
- To stop and save the trace into an event trace log (ETL), run: wpr -stop .etl
View a WPA trace
Use the WPA tool to view and analyze Modern Standby traces. Download the WPA tool, install it on a computer, and follow these instructions to open the trace file:
- Run Wpa.exe. Note that Wpa.exe is available for x86 and x64 only.
- In the WPA menu, click File, click Open, and select a trace file.
- To apply a profile, click Profiles\Apply to open a separate Analysis tab.
- Click Browse and select the applicable profile to apply.
- Add other graphs to the current analysis view from Graph Explorer by following these steps:
- Expand a graph category in Graph Explorer.
- Select the graph to add and drag it to the Analysis View pane.
To correlate data from a SleepStudy report to the WPA trace, use the mapping shown in the following table.
SleepStudy | WPA trace |
---|---|
Activators | The PDC Resiliency Activity graph shows a list of activators that were active during the Modern Standby session. |
Processors | The CPU Idle States graph shows a list of the CPUs in the system and their respective states. |
Fx devices | The Device Dstate graph shows the list of Windows power framework (PoFx) devices that were active during the Modern Standby session. |
PDC phases | The PDC Notification Phase graph shows the details of all the PDC phases. |
Networking | Several graphs show networking activities. The PDC Resiliency Activity graph shows activators such as the broker infrastructure (BI) or Windows Push Notification Services (WNS) that can trigger network activities. The Device Dstate graph shows information about the activity of the Wi-Fi device. The Generic Events graph can show events that are triggered by networking components such as WCM, DHCP, and TCPIP. |
Power Requests | The Power Requests graph shows details for all power requests that were active during this session. The relevant request types for Modern Standby are «System Required» and «Execution Required» power requests. «Display Required» are used for screen on scenarios. |
Common WPA graphs for Modern Standby power management
[!Important] @Jacob Write up on power request graphs -> under graphs and SPR section
The graphs that are generated from the Modern Standby WPA profile are key to observing system behavior in Modern Standby and identifying problems. Two commonly used WPA graphs are the Platform Idle State graph, which shows how much time the platform spends in the various platform idle states, and the DRIPS graph, which shows the activity levels of software and hardware components.
Each graph has a table view that shows the raw data that was used to construct the graph. The view can be configured by using the buttons that are located at the upper right-hand corner of the graph window.
The default view is graph only. The following paragraphs explain how to change the default view to obtain information about Modern Standby behavior.
Platform Idle State graph
The Platform Idle State graph shows the residency in platform idle states plotted against time.
On different platforms, the numerical states might correspond to different System on a Chip (SoC) states. Contact the SoC vendor to get the specific mapping for their hardware. This section covers only the lowest power platform state because the time spent in this state is critical to Modern Standby battery life.
The most important of the platform idle states is the deepest state, DRIPS. The DRIPS state corresponds to the lowest power state for the SoC during Modern Standby. Each SoC defines its own DRIPS state and corresponding state index.
The percentage of time that is spent in the DRIPS state (DRIPS percent) is an important metric for Modern Standby because it is directly proportional to battery life. If the DRIPS percent is high (above 90 percent), battery life will be longer than if the DRIPS percent is lower (for example, below 80 percent).
To obtain the DRIPS percent, open the table view and drag the % Duration column to filter on State. This column will then display the percentage of time that the system was in each state.
DRIPS graph
The DRIPS graph shows the components that are active during the trace period, including activators, devices, and processes. Use this graph to identify the components that are active the longest and that prevent the system from entering DRIPS.
Activators are components that take references and perform tasks while in Modern Standby. They handle the value-adding, explicitly allowed software activities that can run during sleep. Ideally, they should be active only in short bursts, and the DRIPS graph can be used to identify the most active activator during a Modern Standby session. This information is important because a particular activator could hold a reference for a long period of time, which prevents the system from entering DRIPS.
All components that are shown in the preceding graph, except for Devices and CPU Activity, are activators. For example, the preceding graph shows BI, WNS, NCSI, and Image Download Manager as activators. To identify the top activators, open the table view and look at the % Reason Time column, which shows the percentage of time the activator was active during the Modern Standby session. For example, the following screenshot shows that BI is the top activator with 49.71 percent active.
BI is a special activator because it provides broker services to apps to access system resources. When BI shows up as an active activator, expand the BI row and determine which apps are causing BI to be active. Use this graph to determine the top active apps during the Modern Standby session.
In addition to activators, active devices might prevent the system from entering DRIPS.
Similar to system idle states, devices have low-power states that range from D0 to D3. Device low-power states are generally standardized by device class. Low-power states for devices the SoC itself are defined by the SoC manufacturer. Low-power states for devices outside of the SoC are typically standardized across all systems.
Use the DRIPS graph to determine the top active devices during the Modern Standby session. The graph shows only those devices that can block the SoC idle state (DRIPS), based on information provided by the platform power engine plug-in (PEP). For more information about the PEP, see PoFxPowerControl.
Some devices can be active because an activator is running tasks that require the device to be active. Common examples are the primary storage (eMMc/SSD) and Wi-Fi devices, which are active whenever the BI activator is active.
To identify the most active devices, open the table view and look at the % Reason Time column, which shows the percentage of time that each device was active during the Modern Standby session.
In addition to activators and devices, a final reason that the system cannot enter DRIPS is due to excessive CPU activity. CPU activity is a less common problem compared to activators and devices, but might be exacerbated by OEM pre-installed desktop applications and services.
View the active processes by expanding the CPU Activity row.
Windows Performance Analyzer step-by-step guide
This section presents a detailed walkthrough of the capabilities of the Windows Performance Analyzer (WPA) user interface (UI).
Step 1: Opening an ETL File
WPA can open any event trace log (ETL) files that are created by using Windows Performance Recorder (WPR) or Xperf.
To open an ETL file in WPA
On the File menu, click Open.
If you have saved your ETL file to a location other than the default, navigate to that location.
By default, WPR saves ETL files in your Documents\WPR Files folder.
Select the desired file, and click Open.
You can also open WPA from the results page of assessments that are created by using the Assessment Platform.
To open WPA from an assessment
- After you have run the job, click the WPA in-depth analysis link in the Issues pane on the View Results page. You may have to expand the issue to see this link.
Step 2: Selecting Graphs
All available graphs for a recording are visible in the Graph Explorer window. Expand any node by clicking the small triangle. Then, drag the graphs to the Analysis tab to view the full-size version of the graph and its associated data table. You can also double-click the graph to open it on the Analysis tab.
By using the layout icons on the right of the graph title bar, you can select to view only the graph, only the data table, or both.
Step 3: Selecting a Time Interval
On the Analysis tab, you can select a time interval by dragging the pointer horizontally across a section of the graph. The timeline at the bottom of the tab applies to all graphs on the tab.
Step 4: Zooming in on a Time Interval
After you have selected a time interval, you can zoom in to expand that time interval to the full width of the Analysis tab. To do this, right-click the interval, and then select Zoom to selected time range. You can repeat this step several times to see very fine detail of a very small time interval.
All graphs on the Analysis tab use the same timeline. Therefore, this action expands the same time interval for all those graphs.
Step 5: Highlighting a Selected Time Interval
After you have selected a time interval, you can also highlight that time interval in all graphs on the Analysis tab and in the Graph Explorer window. To do this, right-click the interval, and then select Highlight Selection. This action freezes the selection regardless of where else you click. To clear the selection, right-click the interval, and then select Clear Selection.
Step 6: Customizing a Data Table
You can drag columns to any position in the data table. You can click the table header over any column to sort by that column. You can also click the table header again to reverse the sorting. When you change the data table, the changes are also reflected in the Legend control of the graph. The Legend column of the data table matches the Legend control of the graph.
You can customize data tables by selecting what columns to display. To open the Column Chooser box, right-click the table header. You can then select columns individually or create or apply preset combinations of columns to display.
Data tables are pivot tables. The columns to the left of the vertical gold bar are keys. The columns between the vertical gold bar and the vertical blue bar are the data columns. If you do not see the vertical gold bar, scroll to the right.
You can drag any column to the left of the vertical gold bar to make it a key. You can also drag some columns to the right of the vertical blue bar to make them graphing elements.
You can freeze a small selection of columns by right-clicking to show vertical gray freeze bars. Then, the scroll bar scrolls only between the columns between the freeze bars. You can drag the freeze bars to include any number of columns.
Step 7: Opening a New Analysis Tab
All graphs and tables on an Analysis tab share the same timeline and are zoomed in and out together. If you want to view some graphs on a different timeline, you can open an additional Analysis tab. To do this, click New Analysis View on the Window menu, and then drag the desired graphs to the new tab.
Step 8: Opening or Closing Windows
On the Window menu, select the windows that you want to open or close.
Step 9: Creating and Applying a View Profile
After you have set the layout in the way that you want, you can create a view profile that reproduces the current layout either every time that you open WPA or only for specific types of recordings. On the Profiles menu, click Export to create a view profile, click Apply to apply a view profile that you previously created, or click Save Startup Profile to see the current layout view every time that you open WPA.
Step 10: Searching and Filtering
You can filter the data in a graph and its associated data table by right-clicking the graph Legend control and enabling or disabling the desired items. To show only the selected row or rows, right-click the data table, and then click Filter To Selection.
To select the columns to display in the data table, right-click the table header, and then select or clear the columns in the Column Chooser box.
To search the text in the data table, right-click the table, and then select Find, Find Next, or Find Previous.
Step 11: Setting User Preferences
Currently, you can set WPA to load symbols, and you can set symbol paths. These options are available on the Trace menu.
Step 12: Using the Diagnostic Console
This window lists exceptions that occurred in the analysis workflow. You can diagnose symbol decoding issues from this console.
Step 13: Viewing Assessment Analysis and Issue Details
When you open WPA from an assessment that was run in the Assessment Console and that provides additional analysis, the issues that the assessment identifies appear in the Issues window. If you click one of these issues, details and a recommended solution appear in the Analysis tab under Issue Details.
You can also search the list of issues by using the Search options at the top of the Issues window. More information about this functionality is available in Issues Window.