js/src/devtools/rootAnalysis/Makefile.in

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 # -*- Mode: makefile -*-
michael@0 2 #
michael@0 3 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6
michael@0 7 # This Makefile is used to kick off a static rooting analysis. This Makefile is
michael@0 8 # NOT intended for use as part of the standard Mozilla build. Instead, this
michael@0 9 # Makefile will use $PATH to subvert compiler invocations to add in the sixgill
michael@0 10 # plugin, and then do a regular build of whatever portion of the tree you are
michael@0 11 # analyzing. The plugins will dump out several xdb database files. Various
michael@0 12 # analysis scripts, written in JS, will run over those database files to
michael@0 13 # produce the final analysis output.
michael@0 14
michael@0 15 include $(topsrcdir)/config/config.mk
michael@0 16
michael@0 17 # Tree to build and analyze, defaulting to the current tree
michael@0 18 TARGET_JSOBJDIR ?= $(MOZ_BUILD_ROOT)
michael@0 19
michael@0 20 # Path to a JS binary to use to run the analysis. You really want this to be an
michael@0 21 # optimized build.
michael@0 22 JS ?= $(MOZ_BUILD_ROOT)/shell/js
michael@0 23
michael@0 24 # Path to an xgill checkout containing the GCC plugin, xdb-processing binaries,
michael@0 25 # and compiler wrapper scripts used to automatically integrate into an existing
michael@0 26 # build system.
michael@0 27 SIXGILL ?= @SIXGILL_PATH@
michael@0 28
michael@0 29 # Path to the JS scripts that will perform the analysis, defaulting to the same
michael@0 30 # place as this Makefile.in, which is probably what you want.
michael@0 31 ANALYSIS_SCRIPT_DIR ?= $(srcdir)
michael@0 32
michael@0 33 # Number of simultanous analyzeRoots.js scripts to run.
michael@0 34 JOBS ?= 6
michael@0 35
michael@0 36 all : rootingHazards.txt allFunctions.txt
michael@0 37
michael@0 38 CALL_JS := time env PATH=$$PATH:$(SIXGILL)/bin XDB=$(SIXGILL)/bin/xdb.so $(JS)
michael@0 39
michael@0 40 src_body.xdb src_comp.xdb: run_complete
michael@0 41 @echo Started compilation at $$(date)
michael@0 42 $(ANALYSIS_SCRIPT_DIR)/run_complete --foreground --build-root=$(TARGET_JSOBJDIR) --work-dir=work -b $(SIXGILL)/bin $(CURDIR)
michael@0 43 @echo Finished compilation at $$(date)
michael@0 44
michael@0 45 callgraph.txt: src_body.xdb src_comp.xdb computeCallgraph.js
michael@0 46 @echo Started computation of $@ at $$(date)
michael@0 47 $(CALL_JS) $(ANALYSIS_SCRIPT_DIR)/computeCallgraph.js > $@.tmp
michael@0 48 mv $@.tmp $@
michael@0 49 @echo Finished computation of $@ at $$(date)
michael@0 50
michael@0 51 gcFunctions.txt: callgraph.txt computeGCFunctions.js annotations.js
michael@0 52 @echo Started computation of $@ at $$(date)
michael@0 53 $(CALL_JS) $(ANALYSIS_SCRIPT_DIR)/computeGCFunctions.js ./callgraph.txt > $@.tmp
michael@0 54 mv $@.tmp $@
michael@0 55 @echo Finished computation of $@ at $$(date)
michael@0 56
michael@0 57 gcFunctions.lst: gcFunctions.txt
michael@0 58 perl -lne 'print $$1 if /^GC Function: (.*)/' gcFunctions.txt > $@
michael@0 59
michael@0 60 suppressedFunctions.lst: gcFunctions.txt
michael@0 61 perl -lne 'print $$1 if /^Suppressed Function: (.*)/' gcFunctions.txt > $@
michael@0 62
michael@0 63 gcTypes.txt: src_comp.xdb computeGCTypes.js annotations.js
michael@0 64 @echo Started computation of $@ at $$(date)
michael@0 65 $(CALL_JS) $(ANALYSIS_SCRIPT_DIR)/computeGCTypes.js > $@.tmp
michael@0 66 mv $@.tmp $@
michael@0 67 @echo Finished computation of $@ at $$(date)
michael@0 68
michael@0 69 allFunctions.txt: src_body.xdb
michael@0 70 @echo Started computation of $@ at $$(date)
michael@0 71 time $(SIXGILL)/bin/xdbkeys $^ > $@.tmp
michael@0 72 mv $@.tmp $@
michael@0 73 @echo Finished computation of $@ at $$(date)
michael@0 74
michael@0 75 rootingHazards.txt: gcFunctions.lst suppressedFunctions.lst gcTypes.txt analyzeRoots.js annotations.js gen-hazards.sh
michael@0 76 @echo Started computation of $@ at $$(date)
michael@0 77 time env JS=$(JS) ANALYZE='$(ANALYSIS_SCRIPT_DIR)/analyzeRoots.js' SIXGILL='$(SIXGILL)' '$(ANALYSIS_SCRIPT_DIR)/gen-hazards.sh' $(JOBS) > $@.tmp
michael@0 78 mv $@.tmp $@
michael@0 79 @echo Finished computation of $@ at $$(date)

mercurial