Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | This directory contains scripts and a makefile for running Brian Hackett's |
michael@0 | 2 | static GC rooting analysis on a JS source directory. |
michael@0 | 3 | |
michael@0 | 4 | To use it: |
michael@0 | 5 | |
michael@0 | 6 | 1. Download and compile sixgill. Make sure the gcc plugin is enabled. (The |
michael@0 | 7 | configure output will tell you.) |
michael@0 | 8 | |
michael@0 | 9 | - [sfink] I needed a couple of patches to get it work on Fedora 16/17/18. |
michael@0 | 10 | Ask me if you need them. |
michael@0 | 11 | |
michael@0 | 12 | 2. Compile an optimized JS shell that includes the patch at |
michael@0 | 13 | <http://people.mozilla.org/~sfink/data/bug-835552-cwd-snarf>. This does not |
michael@0 | 14 | need to be in the same source tree as you are running these scripts from. |
michael@0 | 15 | Remember the full path to the resulting JS binary; we'll call it $JS_SHELL |
michael@0 | 16 | below. |
michael@0 | 17 | |
michael@0 | 18 | 3. |make clean| in the objdir of the JS source tree that you're going to be |
michael@0 | 19 | analyzing. (These analysis scripts will default to the tree they are within, |
michael@0 | 20 | but you can point them at another tree.) |
michael@0 | 21 | |
michael@0 | 22 | 4. in $objdir/js/src/devtools/analysis, |make JS=$JS_SHELL |
michael@0 | 23 | SIXGILL=.../path/to/sixgill...|. You may need one or more of the following |
michael@0 | 24 | additional settings in addition to the |JS| already given: |
michael@0 | 25 | |
michael@0 | 26 | - JSOBJDIR: if you are analyzing a different source tree, set this to the |
michael@0 | 27 | objdir of the tree you want to analyze. |
michael@0 | 28 | |
michael@0 | 29 | - ANALYSIS_SCRIPT_DIR: by default, the *.js files within the directory |
michael@0 | 30 | containing this README will be used, but you can point to a different |
michael@0 | 31 | directory full. At the time of this writing, there are some changes not in |
michael@0 | 32 | bhackett's git repo that are necessary, and you'll also need the |
michael@0 | 33 | gen-hazards.sh shell script. |
michael@0 | 34 | |
michael@0 | 35 | - JOBS: set this to the number of parallel jobs you'd like to run the final |
michael@0 | 36 | analysis pass with. This defaults to 6, somewhat randomly, which gave me a |
michael@0 | 37 | large speedup even on a machine with only 2 cores. |
michael@0 | 38 | |
michael@0 | 39 | The results will be in rootingHazards.txt |