15
edits
| Line 49: | Line 49: | ||
ac_add_options --enable-logrefcnt | ac_add_options --enable-logrefcnt | ||
and reconfigure and rebuild. Then run the app on the bloaturls list of urls with the environment variable XPCOM_MEM_REFCNT_LOG set to | and reconfigure and rebuild. Then run the app on the bloaturls list of urls with the environment variable XPCOM_MEM_REFCNT_LOG set to 1 to dump bloat and leak summaries to stdout: | ||
export XPCOM_MEM_REFCNT_LOG= | export XPCOM_MEM_REFCNT_LOG=1 | ||
<appname> resource:///res/bloatcycle.html | <appname> resource:///res/bloatcycle.html > bloat.log | ||
If you want to compare two runs (e.g. test a change) do something like this: | |||
export XPCOM_MEM_REFCNT_LOG=1 | |||
cvs co mozilla/tools/tinderbox/bloatdiff.pl | |||
<appname> resource:///res/bloatcycle.html > a.out | |||
**make change** | |||
<appname> resource:///res/bloatcycle.html > b.out | |||
<appname> resource:///res/bloatcycle.html | bloatdiff.pl a.out b.out | ||
With a non-debug browser build on Linux from CVS tip as of 2007-07-05 the dump of bloatcycle.html test exceeds 10 GB. Thus if 20+ GB of the disk space is not available, use gzip when running the tests to compress the dumps down to 100 MB or so: | |||
export XPCOM_MEM_REFCNT_LOG=1 | |||
cvs co mozilla/tools/tinderbox/bloatdiff.pl | cvs co mozilla/tools/tinderbox/bloatdiff.pl | ||
<appname> resource:///res/bloatcycle.html | gzip > a.out.gz | |||
**make change** | **make change** | ||
<appname> resource:///res/bloatcycle.html | gzip > b.out.gz | |||
bloatdiff.pl a.out b.out | bloatdiff.pl 'zcat a.out.gz|' 'zcat b.out.gz|' | ||
= Trace-Malloc Bl/Lk: Bloat & Leak numbers = | = Trace-Malloc Bl/Lk: Bloat & Leak numbers = | ||
edits