tools/footprint/README.reports

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1                  Gross Dynamic Footprint Reports
     2              Chris Waterson <waterson@netscape.com>
     3                       November 16, 2000
     5 This is a short primer on how to run the ``gross dynamic footprint''
     6 reports.
     8 Win32
     9 -----
    11 I've tried this on Win2K. Should work on NT, probably not 98.
    13 1. Configure your machine with a ``standard'' mozilla build
    14 environment, as described at:
    16   http://www.mozilla.org/build/win32.html
    18 Specifically, you'll need the Cygnus tools (GNU make, awk, sed), which
    19 can be downloaded from:
    21   http://sourceware.cygnus.com/cygwin/download.html
    23 2. Install the Win32 version of GNUplot, avaialable from:
    25   ftp://ftp.dartmouth.edu/pub/gnuplot/gnuplot3.7cyg.zip
    27 3. Configure a web server with the ``buster.cgi'' CGI script contained
    28 in this directory.
    30 4. Pull and build a ``release'' build. Besides the normal Win32 flags
    31 described on the Win32 build instructions, be sure that you've set the
    32 following:
    34   set BUILD_OPT=1
    35   set MOZ_DEBUG=
    37 That is, MOZ_DEBUG should be unset.
    39 5. To collect data and build the dynamic footprint graph, type the
    40 following command from the mozilla/tools/footprint directory:
    42   make --unix -fwin32-gdf.mk \
    43     BUSTER_URL="http://myserver/cgi-bin/buster.cgi?refresh=10"
    45 (Replace ``myserver'' with the name of the webserver where you
    46 installed ``buster.cgi'' in step 3, above.)
    48 This should:
    50   - Build ``wm.exe'', which will spy on memory usage.
    51   - Run the winEmbed program over the top 100 URLs (from top100.txt)
    52     to generate a file called ``winEmbed.dat''
    53   - Run mozilla over the top 100 URLs to generate a file called
    54     ``mozilla.dat''
    55   - Use gnuplot to create a PNG image file called win32-gdf.png
    57 Linux
    58 -----
    60 1. Configure your machine with a ``standard'' mozilla build
    61 environment, as described at:
    63   http://www.mozilla.org/build/unix.html
    65 2. Install GNUplot, which is available as an RPM on RedHat-6.2 CDs
    66 (probably others, as well).
    68 3. Configure a web server with the ``buster.cgi'' CGI script contained
    69 in this directory.
    71 4. Pull and build a ``release build''. Here are the settings you
    72 should use in your .mozconfig file:
    74    ac_add_options --enable-optimize
    75    ac_add_options --disable-debug
    76    ac_add_options --enable-strip-libs
    78 5. To collect data and build the dynamic footprint graph, type the
    79 following command from the mozilla/tools/footprint directory:
    81   make -flinux-gdf.mk \
    82     BUSTER_URL="http://myserver/cgi-bin/buster.cgi?refresh=10"
    84 (Replace ``myserver'' with the name of the webserver where you
    85 installed ``buster.cgi'' in step 3, above.)
    87 Details, details, details
    88 -------------------------
    90 1. When running these tests, you'll probably want to use predictable
    91 cache settings. You can modify $(DIST)/bin/defaults/pref/all.js to
    92 tweak settings that will be used by [win|gtk]Embed (these programs
    93 ignore profile-specific settings AFAIK). For example, I've used these
    94 to try to cull out cache usage altogether:
    96   pref("browser.cache.disk_cache_size",       0);
    97   pref("browser.cache.enable",                false);
    98   pref("browser.cache.disk.enable",           false);
    99   pref("browser.cache.memory_cache_size",     0);
   100   pref("browser.cache.disk_cache_ssl",        false);
   102 I think the image cache has a pref that you can use to shut it off as
   103 well. Haven't found it yet.
   105 2. If you collect data using Mozilla (as Win32 will do, by default), I
   106 recommend using a clean profile for consistency's sake. Otherwise,
   107 results will vary based on random stuff like how big your bookmarks
   108 are, how big your global history is, whether or not you've started
   109 mail, etc.
   111 3. I removed the ``plugin downloader plugin'' libnullplugin.so, as
   112 well as all other plugins, from $(DIST)/bin/plugins so that no plugins
   113 would be loaded.

mercurial