In this episode of Defrag Tools, Chad Beeder and Sylvain Goyette demonstrate how to do critical path analysis in Windows Performance Analyzer (WPA), to troubleshoot apps which have an unresponsive UI. WPA is available in the Assessment and Deployment Kit (ADK).

Timeline:

[00:00] Introductions and overview
[02:10] Thread scheduling states (for lots of details see the Windows Internals book)
[04:28] Sylvain’s sample app – click a button and the UI hangs
[05:10] To diagnose: Launch Windows Performance Recorder and get a verbose mode trace using First level triage and CPU usage profiles.
[07:40] Open the trace in Windows Performance Analyzer. Make sure you have the symbol path configured (including the symbols for your app).
[09:19] First, look at the UI Delays graph and find the hung UI thread.
[10:40] Then look at CPU Usage. Start with the UI thread we found previously and, using the CPU Usage (Precise) events, find the dependency on another thread.
[15:11] Look at the call stacks – New Thread Stack and Ready Thread Stack columns. Ready Thread tells you what it was waiting on. Repeat as necessary to find what we were ultimately waiting on.
[23:10] Can also look at the CPU Usage (Sampled) view to get a statistical view of what the CPU was doing during a given time period.
[24:42] Another example: Do the same type of analysis on a boot trace, starting with looking at the Windows Logon instrumentation to see why logon is slow.
[29:29] Questions? Email us at [email protected]





Source link