From:  David Rajchenbach-Teller <dteller@mozilla.com>
Date:  05 Nov 2015 03:07:48 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.memory
Subject:  

Re: New heap snapshots tool in the developer tools

NNTP-Posting-Host:  63.245.214.181

That sounds very useful.

Any chance we can get the same kind of output on the console in case of
mochitest memory leak?

Cheers,
 David

On 03/11/15 23:32, 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 recording[2].
> 
> 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.
> 
> http://i.imgur.com/QrcrtWq.png
> 
> 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".
> 
> http://i.imgur.com/hEPTqrT.png
> 
> 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:
> https://developer.mozilla.org/en-US/docs/Tools/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_!
> 
> Thanks,
> 
> Nick
> 
> [0]
> https://groups.google.com/d/msg/mozilla.dev.developer-tools/TIehyWbmXiQ/g-iLjF3eAgAJ
> 
> [1]
> https://dxr.mozilla.org/mozilla-central/rev/59a6ad6a921f4809dfc37d943d765300c65721e5/js/public/UbiNode.h#31-163
> 
> [2]
> https://dxr.mozilla.org/mozilla-central/rev/59a6ad6a921f4809dfc37d943d765300c65721e5/js/src/vm/SavedStacks.h#21-148
> 
> 
> _______________________________________________
> firefox-dev mailing list
> firefox-dev@mozilla.org
> https://mail.mozilla.org/listinfo/firefox-dev
> 


-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla