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