Performance/MemShrink/DMD: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 323: Line 323:
By default, DMD stack traces do not exceed 24 frames. You can reduce this.
By default, DMD stack traces do not exceed 24 frames. You can reduce this.


==== --max-records=<1..1000000> ====
==== --show-dump-stats=<yes|no> ====


By default, DMD will print 1000 stack trace records of each kind. You can
You can request statistics on each dump with this option.
increase or decrease this.


==== --mode=<normal|test|stress> ====
==== --mode=<normal|test|stress> ====


<tt>--mode=<normal|test|stress></tt> can be used to invoke "test" or "stress" mode, which are useful if you're hacking on DMD. The default is normal mode.
<tt>--mode=<normal|test|stress></tt> can be used to invoke "test" or "stress" mode, which are only useful if you're hacking on DMD. The default is normal mode.


"test" and "stress" modes set their own <tt>--sample-below</tt> values, so you
"test" and "stress" modes set their own <tt>--sample-below</tt> values, so you
should never have to specify both <tt>--sample-below</tt> and <tt>--mode</tt>.
should never have to specify both <tt>--sample-below</tt> and <tt>--mode</tt>.
To run the tests, specify <tt>--mode=test</tt> and start Firefox. It will print out some stuff and very quickly exit. Then run the following command from the top of your source directory.
  memory/replace/dmd/check_test_output.py . test.dmd
(If you invoked Firefox from a different directory to your source directory, you might need to specify the path to <tt>test.dmd</tt>.)
This script checks the output produced by the previous step, and will indicate if the test passed or failed. It should work on Linux and Mac, but is unreliable on Windows.


== Which heap blocks are reported? ==
== Which heap blocks are reported? ==
Confirmed users
1,345

edits

Navigation menu