opensource.google.com

Menu

UIforETW: Windows Profiling Made Easier

Tuesday, April 14, 2015

Microsoft’s Event Tracing for Windows (ETW, aka xperf) is an amazing tool for understanding the performance of Windows computers. ETW offers an incredibly deep view into the entire system and allows investigations of complex problems that would otherwise be intractable. It can even be used to record traces on a customer’s machine for later analysis on a developer’s machine, to investigate performance problems that cannot be reproduced locally.


However, the process of recording ETW trace has always been challenging, so we’re pleased to share a new tool we’ve been developing:  UIforETW. This tool brings point-and-click simplicity to recording ETW traces, works around several trace recording bugs, and is a handy dashboard for managing and annotating traces. And since UIforETW is open source, you can add additional features for your own particular needs.




Tracing can be done to a file or to an in-memory circular buffer. Trace compression, high-speed sampling, heap tracing, and other options can be configured with the click of a button. UIforETW lists the recorded traces and lets users rename and annotate them. When you want to analyze a trace, you can launch Microsoft’s trace viewers from UIforETW, and UIforETW will configure improved viewer defaults for WPA.


UIforETW was written by a Chrome developer, so it has a few Chrome specific features. If the Chrome symbol server is enabled, then UIforETW downloads and strips the Chrome symbols in order to avoid a twenty five minute delay when WPA loads the symbols. UIforETW also preprocesses the traces in order to categorize the Chrome processes by type. These features can be turned off in the Settings dialog if you aren’t working on Chrome. While the Chrome specific features will not be needed by most developers, they demonstrate the potential value from custom processing of traces.


UIforETW is a new project but is already being used for production work. More technical details and information about UIforETW and ETW in general can be found in the author's blog post and discussions can be had at our discussion group. Information about contributing to UIforETW can be found in the CONTRIBUTING file in the GitHub repo.

by Bruce Dawson, Chrome team
.