MailNews:Memory Bloat and Leak Tests: Difference between revisions

→‎Manually Running Tests: Add section on how to set up the profile.
(Add note about the SeaMonkey tinderbox now running these tests)
(→‎Manually Running Tests: Add section on how to set up the profile.)
Line 51: Line 51:


== Manually Running Tests ==
== Manually Running Tests ==
TODO: Document how to set up the profile.


=== Setting up ===
=== Setting up ===


''Note until the patches on {{bug|427980}} are checked in, this process won't work without the patches being manually applied.''
''Note until the patches on {{bug|427980}} are checked in, this process won't work without the patches being manually applied.''
==== Build Set up ====


# Build Thunderbird or SeaMonkey trunk with your standard mozconfig file, but with the following options set:
# Build Thunderbird or SeaMonkey trunk with your standard mozconfig file, but with the following options set:
Line 75: Line 75:
</pre>
</pre>


You will now be able to run SeaMonkey or Thunderbird from the object directory and the automation suite will run (but you won't get the leak or bloat output).
You will now be able to run SeaMonkey or Thunderbird from the object directory and the automation suite will run (but you won't get the leak or bloat output). If you want the profile set up to match as well, see the section below.
 
==== Profile Set Up ====
 
# Enter the executable directory. Use the command:
#* <executable_name> -createProfile <profilename>
# Now go into the mozilla/testing/mailnews/bloat directory and run the command:
#* python setUpBloatTest.py --binary-dir=<directory where executable is> --profile-dir=<directory for profile created in step 1>
 
These two commands will set up the profile the same as on the tinderbox.


=== Reference Count Leak Test ===
=== Reference Count Leak Test ===


# set XPCOM_MEM_BLOAT_LOG to 1 in your environment (see also [http://developer.mozilla.org/en/docs/Debugging_memory_leaks Debugging Memory Leaks])
# set XPCOM_MEM_BLOAT_LOG to 1 in your environment (see also [http://developer.mozilla.org/en/docs/Debugging_memory_leaks Debugging Memory Leaks])
# Start the appropriate executable.
# Start the appropriate executable (using -P <profilename> if required)
# Once the test is completed (application automatically shuts down), you'll get a dump of the objects allocated and which ones are leaking.
# Once the test is completed (application automatically shuts down), you'll get a dump of the objects allocated and which ones are leaking.


Line 88: Line 97:
#* --trace-malloc malloc.log
#* --trace-malloc malloc.log
#* --shutdown-leaks sdleak.log
#* --shutdown-leaks sdleak.log
#* -P <profilename> ''(if required)''
# Wait for the test to complete and the application to shut down.
# Wait for the test to complete and the application to shut down.
# The malloc.log file can then be run through leakstats in the <objdir>/tools/trace-malloc/ directory to obtain the statistics:
# The malloc.log file can then be run through leakstats in the <objdir>/tools/trace-malloc/ directory to obtain the statistics:
canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,628

edits