michael@0: Gross Dynamic Footprint Reports michael@0: Chris Waterson michael@0: November 16, 2000 michael@0: michael@0: This is a short primer on how to run the ``gross dynamic footprint'' michael@0: reports. michael@0: michael@0: Win32 michael@0: ----- michael@0: michael@0: I've tried this on Win2K. Should work on NT, probably not 98. michael@0: michael@0: 1. Configure your machine with a ``standard'' mozilla build michael@0: environment, as described at: michael@0: michael@0: http://www.mozilla.org/build/win32.html michael@0: michael@0: Specifically, you'll need the Cygnus tools (GNU make, awk, sed), which michael@0: can be downloaded from: michael@0: michael@0: http://sourceware.cygnus.com/cygwin/download.html michael@0: michael@0: 2. Install the Win32 version of GNUplot, avaialable from: michael@0: michael@0: ftp://ftp.dartmouth.edu/pub/gnuplot/gnuplot3.7cyg.zip michael@0: michael@0: 3. Configure a web server with the ``buster.cgi'' CGI script contained michael@0: in this directory. michael@0: michael@0: 4. Pull and build a ``release'' build. Besides the normal Win32 flags michael@0: described on the Win32 build instructions, be sure that you've set the michael@0: following: michael@0: michael@0: set BUILD_OPT=1 michael@0: set MOZ_DEBUG= michael@0: michael@0: That is, MOZ_DEBUG should be unset. michael@0: michael@0: 5. To collect data and build the dynamic footprint graph, type the michael@0: following command from the mozilla/tools/footprint directory: michael@0: michael@0: make --unix -fwin32-gdf.mk \ michael@0: BUSTER_URL="http://myserver/cgi-bin/buster.cgi?refresh=10" michael@0: michael@0: (Replace ``myserver'' with the name of the webserver where you michael@0: installed ``buster.cgi'' in step 3, above.) michael@0: michael@0: This should: michael@0: michael@0: - Build ``wm.exe'', which will spy on memory usage. michael@0: - Run the winEmbed program over the top 100 URLs (from top100.txt) michael@0: to generate a file called ``winEmbed.dat'' michael@0: - Run mozilla over the top 100 URLs to generate a file called michael@0: ``mozilla.dat'' michael@0: - Use gnuplot to create a PNG image file called win32-gdf.png michael@0: michael@0: Linux michael@0: ----- michael@0: michael@0: 1. Configure your machine with a ``standard'' mozilla build michael@0: environment, as described at: michael@0: michael@0: http://www.mozilla.org/build/unix.html michael@0: michael@0: 2. Install GNUplot, which is available as an RPM on RedHat-6.2 CDs michael@0: (probably others, as well). michael@0: michael@0: 3. Configure a web server with the ``buster.cgi'' CGI script contained michael@0: in this directory. michael@0: michael@0: 4. Pull and build a ``release build''. Here are the settings you michael@0: should use in your .mozconfig file: michael@0: michael@0: ac_add_options --enable-optimize michael@0: ac_add_options --disable-debug michael@0: ac_add_options --enable-strip-libs michael@0: michael@0: 5. To collect data and build the dynamic footprint graph, type the michael@0: following command from the mozilla/tools/footprint directory: michael@0: michael@0: make -flinux-gdf.mk \ michael@0: BUSTER_URL="http://myserver/cgi-bin/buster.cgi?refresh=10" michael@0: michael@0: (Replace ``myserver'' with the name of the webserver where you michael@0: installed ``buster.cgi'' in step 3, above.) michael@0: michael@0: Details, details, details michael@0: ------------------------- michael@0: michael@0: 1. When running these tests, you'll probably want to use predictable michael@0: cache settings. You can modify $(DIST)/bin/defaults/pref/all.js to michael@0: tweak settings that will be used by [win|gtk]Embed (these programs michael@0: ignore profile-specific settings AFAIK). For example, I've used these michael@0: to try to cull out cache usage altogether: michael@0: michael@0: pref("browser.cache.disk_cache_size", 0); michael@0: pref("browser.cache.enable", false); michael@0: pref("browser.cache.disk.enable", false); michael@0: pref("browser.cache.memory_cache_size", 0); michael@0: pref("browser.cache.disk_cache_ssl", false); michael@0: michael@0: I think the image cache has a pref that you can use to shut it off as michael@0: well. Haven't found it yet. michael@0: michael@0: 2. If you collect data using Mozilla (as Win32 will do, by default), I michael@0: recommend using a clean profile for consistency's sake. Otherwise, michael@0: results will vary based on random stuff like how big your bookmarks michael@0: are, how big your global history is, whether or not you've started michael@0: mail, etc. michael@0: michael@0: 3. I removed the ``plugin downloader plugin'' libnullplugin.so, as michael@0: well as all other plugins, from $(DIST)/bin/plugins so that no plugins michael@0: would be loaded.