DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
                 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=
  set MOZ_PROFILE=

That is, MOZ_DEBUG and MOZ_PROFILE 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.