<div dir="ltr"><div class="gmail_extra"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​On Wed, Nov 4, 2015 at 11:07 AM, David Rajchenbach-Teller <span dir="ltr"><<a href="mailto:dteller@mozilla.com" target="_blank">dteller@mozilla.com</a>></span> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">That sounds very useful.<br>
<br>
Any chance we can get the same kind of output on the console in case of<br>
mochitest memory leak?<br></blockquote><div><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​I've filed ​<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1221704">https://bugzilla.mozilla.org/show_bug.cgi?id=1221704</a> to track this.<br></div><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​You can use `[ThreadSafe]Chrome​Utils.saveHeapSnapshot`[0] to programmatically save a heap snapshot file. This tool is using that under the covers right now, but we don't yet expose importing and exporting these files in the UI. It is pretty high priority to add soon.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Follow along with import and export at <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1215954">https://bugzilla.mozilla.org/show_bug.cgi?id=1215954</a> and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1215953">https://bugzilla.mozilla.org/show_bug.cgi?id=1215953</a><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">So yes, we could definitely programmatically save a heap snapshot file at the end of a mochitest if we detect a leak. A tiny bit more work needed on the tool's frontend to import a saved snapshot.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">​[0] ​</div>h<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">​​</div>ttps://<a href="http://dxr.mozilla.org/mozilla-central/rev/f742b9412ed5aace90ad863b276faae0641090a8/dom/webidl/ThreadSafeChromeUtils.webidl#13-25,36-66">dxr.mozilla.org/mozilla-central/rev/f742b9412ed5aace90ad863b276faae0641090a8/dom/webidl/ThreadSafeChromeUtils.webidl#13-25,36-66</a><br></div></div></div></div>