pjs/tools/footprint
Serge Gautherie 30b78b17ad Bug 479978 - remove references to MOZ_PROFILE from the build system; (Cv2-MC) the 8 files; r=ted.mielczarek 2009-03-28 03:00:25 +01:00
..
lists Bug 473236 - Remove executable bit from files that don't need it. (Only changes file mode -- no code changes.) r=bsmedberg 2009-01-21 22:55:08 -08:00
README.reports Bug 479978 - remove references to MOZ_PROFILE from the build system; (Cv2-MC) the 8 files; r=ted.mielczarek 2009-03-28 03:00:25 +01:00
buster.cgi
codemap.pl
create_dat.awk
foldelf.cpp
foldelf.mk
heapdump.cpp
heapmap.pl
leak-gauge.html Bug 473236 - Remove executable bit from files that don't need it. (Only changes file mode -- no code changes.) r=bsmedberg 2009-01-21 22:55:08 -08:00
leak-gauge.pl Add leak logging for node info managers that can be added to leak-gauge. b=414704 r+sr=sicking a=schrep 2008-02-08 11:55:03 -08:00
linear-regression.awk
linux-gdf.mk Bug 458167 - (comments-only changes) Grammar Nazi Vol1: s/it's/its/ for the posessive version of the word, and a few other misc comment-typos, in these directories: accessible browser config profile rdf toolkit tools xpcom xpfe 2008-10-01 23:49:45 -07:00
linux.gnuplot.in
makefile.win
thrashview.cpp
thrashview.mk
top100.txt
watch.sh
win32-gdf.mk Bug 458167 - (comments-only changes) Grammar Nazi Vol1: s/it's/its/ for the posessive version of the word, and a few other misc comment-typos, in these directories: accessible browser config profile rdf toolkit tools xpcom xpfe 2008-10-01 23:49:45 -07:00
win32.gnuplot.in
wm.cpp

README.reports

                 Gross Dynamic Footprint Reports
             Chris Waterson <waterson@netscape.com>
                      November 16, 2000

This is a short primer on how to run the ``gross dynamic footprint''
reports.

Win32
-----

I've tried this on Win2K. Should work on NT, probably not 98.

1. Configure your machine with a ``standard'' mozilla build
environment, as described at:

  http://www.mozilla.org/build/win32.html

Specifically, you'll need the Cygnus tools (GNU make, awk, sed), which
can be downloaded from:

  http://sourceware.cygnus.com/cygwin/download.html

2. Install the Win32 version of GNUplot, avaialable from:

  ftp://ftp.dartmouth.edu/pub/gnuplot/gnuplot3.7cyg.zip

3. Configure a web server with the ``buster.cgi'' CGI script contained
in this directory.

4. Pull and build a ``release'' build. Besides the normal Win32 flags
described on the Win32 build instructions, be sure that you've set the
following:

  set BUILD_OPT=1
  set MOZ_DEBUG=

That is, MOZ_DEBUG should be unset.

5. To collect data and build the dynamic footprint graph, type the
following command from the mozilla/tools/footprint directory:

  make --unix -fwin32-gdf.mk \
    BUSTER_URL="http://myserver/cgi-bin/buster.cgi?refresh=10"

(Replace ``myserver'' with the name of the webserver where you
installed ``buster.cgi'' in step 3, above.)

This should:

  - Build ``wm.exe'', which will spy on memory usage.
  - Run the winEmbed program over the top 100 URLs (from top100.txt)
    to generate a file called ``winEmbed.dat''
  - Run mozilla over the top 100 URLs to generate a file called
    ``mozilla.dat''
  - Use gnuplot to create a PNG image file called win32-gdf.png

Linux
-----

1. Configure your machine with a ``standard'' mozilla build
environment, as described at:

  http://www.mozilla.org/build/unix.html

2. Install GNUplot, which is available as an RPM on RedHat-6.2 CDs
(probably others, as well).

3. Configure a web server with the ``buster.cgi'' CGI script contained
in this directory.

4. Pull and build a ``release build''. Here are the settings you
should use in your .mozconfig file:

   ac_add_options --enable-optimize
   ac_add_options --disable-debug
   ac_add_options --enable-strip-libs

5. To collect data and build the dynamic footprint graph, type the
following command from the mozilla/tools/footprint directory:

  make -flinux-gdf.mk \
    BUSTER_URL="http://myserver/cgi-bin/buster.cgi?refresh=10"

(Replace ``myserver'' with the name of the webserver where you
installed ``buster.cgi'' in step 3, above.)

Details, details, details
-------------------------

1. When running these tests, you'll probably want to use predictable
cache settings. You can modify $(DIST)/bin/defaults/pref/all.js to
tweak settings that will be used by [win|gtk]Embed (these programs
ignore profile-specific settings AFAIK). For example, I've used these
to try to cull out cache usage altogether:

  pref("browser.cache.disk_cache_size",       0);
  pref("browser.cache.enable",                false);
  pref("browser.cache.disk.enable",           false);
  pref("browser.cache.memory_cache_size",     0);
  pref("browser.cache.disk_cache_ssl",        false);

I think the image cache has a pref that you can use to shut it off as
well. Haven't found it yet.

2. If you collect data using Mozilla (as Win32 will do, by default), I
recommend using a clean profile for consistency's sake. Otherwise,
results will vary based on random stuff like how big your bookmarks
are, how big your global history is, whether or not you've started
mail, etc.

3. I removed the ``plugin downloader plugin'' libnullplugin.so, as
well as all other plugins, from $(DIST)/bin/plugins so that no plugins
would be loaded.