Announcing SyzyProf, a license free, hierarchical performance profiler for Chrome/Windows

159 views
Skip to first unread message

Sigurður Ásgeirsson

unread,
Jun 19, 2012, 4:52:35 PM6/19/12
to chromium-dev
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.


Please see http://code.google.com/p/sawbuck/wiki/SyzyProf for instructions on how to download and use SyzyProf and KCacheGrind/QCacheGrind.

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

Marshall Greenblatt

unread,
Jun 19, 2012, 5:16:01 PM6/19/12
to si...@chromium.org, chromium-dev
Hi Siggi,

Thanks, this is awesome! :-)

Would it be possible to support instrumentation for other Content API applications? For example, would any changes be required beyond moving chrome/common/profiling.cc into content and calling the methods from the appropriate locations?

Thanks,
Marshall

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Sigurður Ásgeirsson

unread,
Jun 19, 2012, 5:46:48 PM6/19/12
to Marshall Greenblatt, chromium-dev
On Tue, Jun 19, 2012 at 5:16 PM, Marshall Greenblatt <magree...@gmail.com> wrote:
Hi Siggi,

Thanks, this is awesome! :-)

Would it be possible to support instrumentation for other Content API applications?

Absolutely!
 
For example, would any changes be required beyond moving chrome/common/profiling.cc into content and calling the methods from the appropriate locations?


That should do it, though the only reason you need that code in Chrome, is because V8 gets indigestion under a return-address swizzling profilers.

John Abd-El-Malek

unread,
Jun 19, 2012, 5:52:50 PM6/19/12
to si...@chromium.org, Marshall Greenblatt, chromium-dev
On Tue, Jun 19, 2012 at 2:46 PM, Sigurður Ásgeirsson <si...@chromium.org> wrote:
On Tue, Jun 19, 2012 at 5:16 PM, Marshall Greenblatt <magree...@gmail.com> wrote:
Hi Siggi,

Thanks, this is awesome! :-)

Would it be possible to support instrumentation for other Content API applications?

Absolutely!
 
For example, would any changes be required beyond moving chrome/common/profiling.cc into content and calling the methods from the appropriate locations?

I'm not sure I understand what you mean? browsers built over content also use v8. 

Sigurður Ásgeirsson

unread,
Jun 19, 2012, 5:54:19 PM6/19/12
to John Abd-El-Malek, Marshall Greenblatt, chromium-dev
On Tue, Jun 19, 2012 at 5:52 PM, John Abd-El-Malek <j...@chromium.org> wrote:


On Tue, Jun 19, 2012 at 2:46 PM, Sigurður Ásgeirsson <si...@chromium.org> wrote:
On Tue, Jun 19, 2012 at 5:16 PM, Marshall Greenblatt <magree...@gmail.com> wrote:
Hi Siggi,

Thanks, this is awesome! :-)

Would it be possible to support instrumentation for other Content API applications?

Absolutely!
 
For example, would any changes be required beyond moving chrome/common/profiling.cc into content and calling the methods from the appropriate locations?

I'm not sure I understand what you mean? browsers built over content also use v8. 

Ah in that case you need to install the V8 profiling hook.

John Abd-El-Malek

unread,
Jun 19, 2012, 5:59:20 PM6/19/12
to Sigurður Ásgeirsson, Marshall Greenblatt, chromium-dev
On Tue, Jun 19, 2012 at 2:54 PM, Sigurður Ásgeirsson <si...@chromium.org> wrote:
On Tue, Jun 19, 2012 at 5:52 PM, John Abd-El-Malek <j...@chromium.org> wrote:


On Tue, Jun 19, 2012 at 2:46 PM, Sigurður Ásgeirsson <si...@chromium.org> wrote:
On Tue, Jun 19, 2012 at 5:16 PM, Marshall Greenblatt <magree...@gmail.com> wrote:
Hi Siggi,

Thanks, this is awesome! :-)

Would it be possible to support instrumentation for other Content API applications?

Absolutely!
 
For example, would any changes be required beyond moving chrome/common/profiling.cc into content and calling the methods from the appropriate locations?

I'm not sure I understand what you mean? browsers built over content also use v8. 

Ah in that case you need to install the V8 profiling hook.

What Marshall was suggesting was if it's possible to move the code that sets things up from chrome to content. That way every browser built over content gets this for free. For example, people interested in profiling just the web-platform part of chrome can profile content_shell.

Sigurður Ásgeirsson

unread,
Jun 19, 2012, 6:01:16 PM6/19/12
to John Abd-El-Malek, Marshall Greenblatt, chromium-dev
On Tue, Jun 19, 2012 at 5:59 PM, John Abd-El-Malek <j...@chromium.org> wrote:


On Tue, Jun 19, 2012 at 2:54 PM, Sigurður Ásgeirsson <si...@chromium.org> wrote:
On Tue, Jun 19, 2012 at 5:52 PM, John Abd-El-Malek <j...@chromium.org> wrote:


On Tue, Jun 19, 2012 at 2:46 PM, Sigurður Ásgeirsson <si...@chromium.org> wrote:
On Tue, Jun 19, 2012 at 5:16 PM, Marshall Greenblatt <magree...@gmail.com> wrote:
Hi Siggi,

Thanks, this is awesome! :-)

Would it be possible to support instrumentation for other Content API applications?

Absolutely!
 
For example, would any changes be required beyond moving chrome/common/profiling.cc into content and calling the methods from the appropriate locations?

I'm not sure I understand what you mean? browsers built over content also use v8. 

Ah in that case you need to install the V8 profiling hook.

What Marshall was suggesting was if it's possible to move the code that sets things up from chrome to content. That way every browser built over content gets this for free. For example, people interested in profiling just the web-platform part of chrome can profile content_shell.

Yes, please do! 

Marshall Greenblatt

unread,
Jun 19, 2012, 6:53:29 PM6/19/12
to Sigurður Ásgeirsson, John Abd-El-Malek, chromium-dev
On Tue, Jun 19, 2012 at 6:01 PM, Sigurður Ásgeirsson <si...@chromium.org> wrote:
On Tue, Jun 19, 2012 at 5:59 PM, John Abd-El-Malek <j...@chromium.org> wrote:


On Tue, Jun 19, 2012 at 2:54 PM, Sigurður Ásgeirsson <si...@chromium.org> wrote:
On Tue, Jun 19, 2012 at 5:52 PM, John Abd-El-Malek <j...@chromium.org> wrote:


On Tue, Jun 19, 2012 at 2:46 PM, Sigurður Ásgeirsson <si...@chromium.org> wrote:
On Tue, Jun 19, 2012 at 5:16 PM, Marshall Greenblatt <magree...@gmail.com> wrote:
Hi Siggi,

Thanks, this is awesome! :-)

Would it be possible to support instrumentation for other Content API applications?

Absolutely!
 
For example, would any changes be required beyond moving chrome/common/profiling.cc into content and calling the methods from the appropriate locations?

I'm not sure I understand what you mean? browsers built over content also use v8. 

Ah in that case you need to install the V8 profiling hook.

What Marshall was suggesting was if it's possible to move the code that sets things up from chrome to content. That way every browser built over content gets this for free. For example, people interested in profiling just the web-platform part of chrome can profile content_shell.

Yes, please do! 

Thanks, filed as: http://crbug.com/133593
 
Reply all
Reply to author
Forward
0 new messages