Hi all,
if you don't care about Chrome's performance, never work on Windows, and can't imagine that you'd ever need to profile your code, you can stop reading now.
SyzyProf is a brand-new, license free, open-source profiler that works well with Chrome on Windows.
SyzyProf captures hierarchical wall-clock execution time with very high resolution and good accuracy. It also captures invocation counts, as well as min/max execution time for instrumented functions.
The invocation data is captured per thread, where threads are named with the textual descriptors Chrome assigns them in base::Thread.
SyzyProf outputs profiling data in the textual file format grokked by the open source profile data viewers KCacheGrind and/or QCacheGrind.
Below is screenshot of QCacheGrind viewing profile data captured from a single browser process. The function in focus here is MessageLoop::RunTask, and the thread in focus is the main thread.
The call graph in the upper right pane is hence restricted to invocations on that thread only, and you can see how it displays both call counts and execution time relative to the parent for each edge in the graph. As a case in point, you can see here that base::Timer::RunScheduledTask has been invoked ~2500 times, and has consumed ~58% of the total wall clock time spent in task execution.
In the lower right-hand pane you can also see the invocation counts and relative wall-clock execution times for RunTask on other threads. if you select another thread (or multiple threads), the call graph will update in realtime to display the metrics for the new selection.
Note that since SyzyProf is an open source project, we can and will change it to suit our needs. The next major feature planned is integrated profiling over C++ and JavaScript code running in V8.
Other possible features for SyzyProf include:
- Capture other metrics.
With some help from the allocator, the instrumentation could capture memory allocations and deallocations, as a case in point.
- Cancel wait times.
This requires adding instrumentation code to Chrome so it can inform the profiler when it's about to do a wait. - Stitch call graphs over Task or IPC boundaries.
It is likely interesting to view linked task executions integrated in a single profile.
If you're interested in helping out with any of those, performance tuning of the instrumentation or other features, please give me a ping.
Siggi