Posted by: benoitgirard | November 8, 2011

Firefox Built-in Profiler

Warning: Some users have having trouble with these instruction. Please see the comments. If you’re adventurous please report any difference so that I can adjust these steps.

Profiling and collecting data right now is a pain. Each platform as its own set of tools that are often never at hand when you notice something going slowly. Or you noticed a short lived hang that you can’t really reproduce once you attach your profiler.

Built-in profiler to the rescue. By having a profiler built in we get many benefits. We can build a profiler that works across platform, that is always on, that grabs markers for important events (page load start, new tab open, first paint), that can be started/stopped programmatically, that can integrated with the UI using extensions and inlines the JS stack.

I made a 5 min demonstration of this profiler in action:

Quicktime version: Profiler Screencast 420p.

This is a proof of concept at this stage. It currently only works well on Mac and somewhat on Android but with a bit of work it should work well on all platforms we support. Further down the road we’re hoping to move the front end to a web application that we can easily collect profiles and link them within bugzilla.

We’re looking for help porting this to windows and linux, hooking in libunwind and working on the web front end. If you’re interested in helping out let us known.

About these ads

Responses

  1. Please, pretty please, with sugar on top, could you avoid adding one more way to unwind stack? Breakpad has one, jprof has one, the refcount logger has one, and ther are probably some more hidden in the code base.

    Pick one, centralize it, improve it, and stick it in libmozutils. Please.

  2. (and C me on the bug ;) )

    • Err that was supposed to read “CC me”, not “C me”.

  3. Screw Quicktime, Firefox supports WebM, where have you been the last couple of years?

  4. I have converted the video to WebM (vp8) encoding so it is easier to view in Firefox. Here is a link to the video:

    http://people.mozilla.org/~jwein/profiler_480.webmvp8.webm

    Thanks Benoit!

    • Thanks, I’m going to upload it to YouTube.

  5. [...] next week we plan to wrap up a profiler, come up with a fix for cache io on startup/shutdown, look into submitting hang stacks in a less [...]

  6. Hey! I know this is kind of off-topic however I needed to ask.
    Does building a well-established website such as yours take a lot of work?
    I am brand new to writing a blog but I do write in my diary every day.
    I’d like to start a blog so I can share my personal experience and feelings online. Please let me know if you have any ideas or tips for brand new aspiring blog owners. Thankyou!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: