Performance/MemShrink/DMD: Difference between revisions

Jump to navigation Jump to search
Line 33: Line 33:
==== Trigger ====
==== Trigger ====


If you are on a sufficiently recent build, visit about:memory and click the "Analyze reports" or "DMD" button. (The button name changed from the latter to the former at one point.) The button won't be present in non-DMD builds, and will be grayed out in DMD builds if DMD isn't enabled at start-up.
Visit about:memory and click the DMD button (depending on how old your build is, it might be labelled "Save" or "Analyze reports" or "DMD"). The button won't be present in non-DMD builds, and will be grayed out in DMD builds if DMD isn't enabled at start-up.


If you are on an older build, visit about:memory, open the web console (with ctrl-shift-k) and in the prompt at the very bottom enter:
This triggers all the memory reporters and then DMD analyzes the reports, printing this commentary:


   DMDReportAndDump('out.dmd')
   DMD[11420] opened /tmp/dmd-1409885041-22021.txt.gz for writing
 
Both actions invoke all the memory reporters and then DMD analyzes the reports, printing this commentary:
 
  DMD: running reporters...
   DMD[11420] Dump 1 {
   DMD[11420] Dump 1 {
   DMD[11420]  gathering stack trace records...
   DMD[11420]  gathering stack trace records...
Line 51: Line 47:
   DMD[11420] }
   DMD[11420] }


The output be written to a file called <code>out.dmd</code> in the current working directory.
If you see the "opened" line, it tells you where the file was saved. If you're on an older build and don't see that, it'll be saved in a file in your current working directory with a <code>.dmd</code> suffix.


==== Post-process ====
==== Post-process ====
Confirmed users
1,345

edits

Navigation menu