Performance:Tinderbox Tests: Difference between revisions

Jump to navigation Jump to search
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 point to a file where to dump bloat an leak summaries:
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=bloat.log
   export XPCOM_MEM_REFCNT_LOG=1
   <appname> resource:///res/bloatcycle.html
   <appname> resource:///res/bloatcycle.html > bloat.log


The size of the log file can easily exceeds several gigabytes on Linux and with a 32-bit browser build the above command may generate an error when the log size reaches 2GB:
If you want to compare two runs (e.g. test a change) do something like this:


   File size limit exceeded
   export XPCOM_MEM_REFCNT_LOG=1
 
  cvs co mozilla/tools/tinderbox/bloatdiff.pl
As a workaround use the following command to compress the log file:
  <appname> resource:///res/bloatcycle.html > a.out
 
    **make change**
  export XPCOM_MEM_REFCNT_LOG=/dev/stdout
   <appname> resource:///res/bloatcycle.html > b.out
   <appname> resource:///res/bloatcycle.html | gzip > bloat.log.gz
  bloatdiff.pl a.out b.out


If you want to compare two runs (e.g. test a change) do something like this:
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
   XPCOM_MEM_REFCNT_LOG=a.out <appname> resource:///res/bloatcycle.html
   <appname> resource:///res/bloatcycle.html | gzip > a.out.gz
     **make change**
     **make change**
   XPCOM_MEM_REFCNT_LOG=b.out <appname> resource:///res/bloatcycle.html
   <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 =
15

edits

Navigation menu