Assume the following: You have a Windows 7 host that you want to collect a trace from. The user complains of audio issues, stuttering, latency, etc…or video frame rate is low. Something annoying.
Like my previous post, lets cover a few basic rules here as we get started:
1. If host = Windows 7 AND bitness = amd64 THEN Set DisablePagingExecutive to 1 and reboot:
2. Make sure the user account we want to trace is local administrator, even temporarily.
After we have that, install the Windows 8 ADK on the target machine, or copy the Windows Performance Toolkit from a machine it has already been installed on onto our target machine.
(We can install by running ADK Setup and deselecting EVERYTHING except Windows Performance Toolkit, by the way.)
So, its there, somewhere.
1. Run WPRUI elevated/as administrator
2. Click More Options on the bottom left, revealing the window that looks like this:
3. For audio and video glitches that are easy to reproduce, check the scenario you are reproducing in the scenario analysis area. Change Logging Mode to File based and hit start.
4. Click “Start” and the reproduce the issue. The window will look like this while you do so:
5. When it reproduces, click Save and save the file off, review in xperfview or Windows Performance Analyzer to determine the cause of the glitches, probably DPCs from usbaudio drivers, but what do I know….
“But way Dude! What if this isn’t easy to reproduce?” you may ask….
6. If this is not easy to reproduce, get setup to collect a trace as above, but don’t use WPRUI.
Instead, elevate a command prompt, go to the root of a drive, I’ll use C: for the example, and do the following after you have DisablePagingExecutive set and WPT installed…make a trace directory and cd to it.
xperf -on dispatcher+latency+drivers -stackwalk readythread+threadcreate+cswitch+profile -f C:\trace\xperftrace.etl -minbuffers 1024 -maxbuffers 1024 -maxfile 512 -filemode circular
Then let it run in the background while you dork around trying to reproduce the issue. Once it hits, simply do the following:
Xperf -d C:\trace\results.etl
Now you can open results.etl in xperfview.exe or Windows Performance Analyzer and look for DPCs and so forth that might be causing the issue….