mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 00:25:27 +00:00
115 lines
3.7 KiB
Plaintext
115 lines
3.7 KiB
Plaintext
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.
|