The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search
Purifying Mozilla on Solaris

Purifying Mozilla on Solaris

Seth Spitzer

sspitzer@netscape.com

post comments / questions to news://news.mozilla.org/netscape.public.mozilla.unix

step 1: build mozilla on solaris
if that is a problem, you got bigger fish to fry

step 2: build the purify version of mozilla
$ setenv PURIFYOPTIONS -best-effort
$ cd mozilla/xpfe/bootstrap
$ gmake CXX=g++ pure

step 3: run the purify version
# I needed to do this or I ran out of file descriptors when trying to run purify
$ limit descriptors 1024

$ cd mozilla/dist/bin
$ ./mozilla -pure

Tips from Bruce Mitchner, Mr. Purify:
# you may want to add these to your ~/.purify file
suppress bsw *
suppress umr _write; write
suppress umr memcmp; LocalConnection; XShmQueryVersion
suppress umr gdk_rgb_try_colormap
suppress umr gdk_color_hash
suppress umr gtk_widget_set_sensitive
suppress umr HandleComposeSequence; _XTranslateKeySym; XLookupString; _MbLookupString; XmbLookupString
suppress abr miSubtractO; miRegionOp; XSubtractRegion; gdk_regions_subtract
suppress umr XListFonts; GetFontNames(char*)
suppress umr __sigprocmask; _thrp_exit; _thr_exit_common; _age; _door_return
suppress fmr XDestroyIC; gdk_ic_destroy; gtk_entry_unrealize
suppress fum free; gdk_ic_destroy; gtk_entry_unrealize
suppress bsw pthread_mutex_unlock

# memory in use 
Purify has a nice preference to have it record memory in use at the time
of the exit of the application.

# BSWs
The BSWs only start showing up after you install some patches on Solaris
2.6.  I think they started showing up for me when I'd had some patches
installed for green threads for Java.

# New leaks
You can have it check for new leaks from the Purify menu.  This rocks.
You can do something in the UI and immediately check for new leaks.
Unfortunately, I don't think it'll show the difference in what is still in
use, so you can't see how much bloat doing something might have (to the
best of my knowledge).

# Potential leaks.
PLK (potential leaks) are real problems, not just 'potential'
problems.  This is due to how QueryInterface stuff works with COM.  Read
the manual to have this made clear.

Copyright © 1998-2000 The Mozilla Organization.
Last modified December 16, 1999.