Confirmed users
1,345
edits
Nnethercote (talk | contribs) |
Nnethercote (talk | contribs) |
||
Line 238: | Line 238: | ||
DMD outputs a gzipped JSON file that contains a description of the heap. After unzipping it, you can analyze it using <tt>$OBJDIR/dist/bin/dmd.py</tt>. | DMD outputs a gzipped JSON file that contains a description of the heap. After unzipping it, you can analyze it using <tt>$OBJDIR/dist/bin/dmd.py</tt>. | ||
Some platforms (Linux, Mac) require stack fixing, which adds missing filename, function name and line number information. This will occur automatically the first time you run <tt>dmd.py</tt> on the output file. This can take several minutes to complete. | Some platforms (Linux, Mac) require stack fixing, which adds missing filename, function name and line number information. This will occur automatically the first time you run <tt>dmd.py</tt> on the output file. This can take several minutes to complete. (This will fail if your build does not contain symbols. However, if you have crash reporter symbols for your build -- as tryserver builds do -- you can use [https://github.com/mstange/analyze-tryserver-profiles/blob/master/resymbolicate_dmd.py this script] instead: clone the whole repo, edit the paths at the top of resymbolicate_dmd.py and run it.) | ||
If you invoke <tt>dmd.py</tt> without arguments you will get output that describes how the live heap blocks are covered by memory reports. This output is broken into multiple sections. | If you invoke <tt>dmd.py</tt> without arguments you will get output that describes how the live heap blocks are covered by memory reports. This output is broken into multiple sections. | ||
Line 247: | Line 247: | ||
# "Once-reported stack trace records": like the "Unreported stack trace records" section, but for blocks reported once. | # "Once-reported stack trace records": like the "Unreported stack trace records" section, but for blocks reported once. | ||
# "Summary": gives measurements of the total heap, and the unreported/once-reported/twice-reported portions of it. | # "Summary": gives measurements of the total heap, and the unreported/once-reported/twice-reported portions of it. | ||
The "Twice-reported stack trace records" and "Unreported stack trace records" sections are the most important, because they indicate ways in which the memory reporters can be improved. | The "Twice-reported stack trace records" and "Unreported stack trace records" sections are the most important, because they indicate ways in which the memory reporters can be improved. |