<div dir="ltr"><div class="gmail_default" style="color:rgb(68,68,68)">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 :)<br><br>I assume we can use it via the WebIDE Devtools?<br><br>Can't wait to try it out!<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(153,153,153)"><font size="1"><b>W I L S O N P A G E</b><br><br>Front-end Developer<br>Firefox OS (Gaia)<br>London Office<br><br>Twitter: @wilsonpage<br>IRC: wilsonpage </font></span><br></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Nov 3, 2015 at 10:32 PM, Nick Fitzgerald <span dir="ltr"><<a href="mailto:nfitzgerald@mozilla.com" target="_blank">nfitzgerald@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi folks!<br>
<br>
(Jordan Santell made an announcement on the devtools mailing list[0], but I<br>
thought I'd spread the word around.)<br>
<br>
The first iteration of the new heap snapshots memory tools landed on m-c in<br>
the middle of the last cycle and rode the train to Developer Edition with<br>
the merge.<br>
<br>
This tool is built on top of JS::ubi::Node[1] which is an API to do<br>
analyses on the heap graph as the GC sees it, and the SavedFrame JS stack<br>
recording[2].<br>
<br>
In this first release, the most notable feature is capturing the JS stack<br>
when objects are allocated so that you can see exactly where your retained<br>
objects are coming from. The downside is that this incurs overhead and you<br>
have to start recording allocation stacks *before* you start saving heap<br>
snapshot. You can also disect the heap into various other buckets.<br>
<br>
<a href="http://i.imgur.com/QrcrtWq.png" rel="noreferrer" target="_blank">http://i.imgur.com/QrcrtWq.png</a><br>
<br>
This initial version is very much just getting something out the door and<br>
there is a ton more coming down the pipe. Filtering/searching and diffing<br>
snapshots are in the works at the moment. Currently, we don't take<br>
advantage of our full access to every node and edge in the heap graph.<br>
Soon, we will compute dominator trees to find "deep" size / retention as<br>
well as find the first N shortest paths from GC roots to objects of<br>
interest. We are also planning on adding support for cycle collected nodes<br>
and edges to the JS::ubi::Node graph.<br>
<br>
You can enable the new tool by going to the settings panel of the devtools<br>
and checking the "Memory" checkbox on the left underneath "Default Firefox<br>
Developer Tools".<br>
<br>
<a href="http://i.imgur.com/hEPTqrT.png" rel="noreferrer" target="_blank">http://i.imgur.com/hEPTqrT.png</a><br>
<br>
If you would like to use this tool for the whole runtime rather than scoped<br>
to a single tab, use the browser toolbox. Here are instructions for<br>
enabling and using the browser toolbox:<br>
<a href="https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox" rel="noreferrer" target="_blank">https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox</a><br>
<br>
Please try it out and file bugs in the "Firefox" product and "Developer<br>
Tools: Memory" component! We want this to be a useful tool for _you_!<br>
<br>
Thanks,<br>
<br>
Nick<br>
<br>
[0]<br>
<a href="https://groups.google.com/d/msg/mozilla.dev.developer-tools/TIehyWbmXiQ/g-iLjF3eAgAJ" rel="noreferrer" target="_blank">https://groups.google.com/d/msg/mozilla.dev.developer-tools/TIehyWbmXiQ/g-iLjF3eAgAJ</a><br>
<br>
[1]<br>
<a href="https://dxr.mozilla.org/mozilla-central/rev/59a6ad6a921f4809dfc37d943d765300c65721e5/js/public/UbiNode.h#31-163" rel="noreferrer" target="_blank">https://dxr.mozilla.org/mozilla-central/rev/59a6ad6a921f4809dfc37d943d765300c65721e5/js/public/UbiNode.h#31-163</a><br>
<br>
[2]<br>
<a href="https://dxr.mozilla.org/mozilla-central/rev/59a6ad6a921f4809dfc37d943d765300c65721e5/js/src/vm/SavedStacks.h#21-148" rel="noreferrer" target="_blank">https://dxr.mozilla.org/mozilla-central/rev/59a6ad6a921f4809dfc37d943d765300c65721e5/js/src/vm/SavedStacks.h#21-148</a><br>
_______________________________________________<br>
dev-platform mailing list<br>
<a href="mailto:dev-platform@lists.mozilla.org">dev-platform@lists.mozilla.org</a><br>
<a href="https://lists.mozilla.org/listinfo/dev-platform" rel="noreferrer" target="_blank">https://lists.mozilla.org/listinfo/dev-platform</a><br>
</blockquote></div><br></div>