From:  Wilson Page <>
Date:  04 Nov 2015 18:51:23 Hong Kong Time

Re: New heap snapshots tool in the developer tools


This looks like a really valuable tool Nick! It's really cool that you can reference memory back to real, familiar object names, haven't seen anything like this before :)

I assume we can use it via the WebIDE Devtools?

Can't wait to try it out!

W I L S O N  P A G E

Front-end Developer
Firefox OS (Gaia)
London Office

Twitter: @wilsonpage
IRC: wilsonpage

On Tue, Nov 3, 2015 at 10:32 PM, Nick Fitzgerald <> wrote:
Hi folks!

(Jordan Santell made an announcement on the devtools mailing list[0], but I
thought I'd spread the word around.)

The first iteration of the new heap snapshots memory tools landed on m-c in
the middle of the last cycle and rode the train to Developer Edition with
the merge.

This tool is built on top of JS::ubi::Node[1] which is an API to do
analyses on the heap graph as the GC sees it, and the SavedFrame JS stack

In this first release, the most notable feature is capturing the JS stack
when objects are allocated so that you can see exactly where your retained
objects are coming from. The downside is that this incurs overhead and you
have to start recording allocation stacks *before* you start saving heap
snapshot. You can also disect the heap into various other buckets.

This initial version is very much just getting something out the door and
there is a ton more coming down the pipe. Filtering/searching and diffing
snapshots are in the works at the moment. Currently, we don't take
advantage of our full access to every node and edge in the heap graph.
Soon, we will compute dominator trees to find "deep" size / retention as
well as find the first N shortest paths from GC roots to objects of
interest. We are also planning on adding support for cycle collected nodes
and edges to the JS::ubi::Node graph.

You can enable the new tool by going to the settings panel of the devtools
and checking the "Memory" checkbox on the left underneath "Default Firefox
Developer Tools".

If you would like to use this tool for the whole runtime rather than scoped
to a single tab, use the browser toolbox. Here are instructions for
enabling and using the browser toolbox:

Please try it out and file bugs in the "Firefox" product and "Developer
Tools: Memory" component! We want this to be a useful tool for _you_!





dev-platform mailing list