running new experiments
[IRC.git] / Robust / src / Benchmarks / oooJava / master-makefile
1 ##########################################################################
2 #
3 #  This master makefile shoudl be included in each local makefile of a
4 #  benchmark directory.  The local makefile should define PROGRAM as
5 #  the name of the class with the main method, which also becomes the
6 #  name of the output binary.  The local makefile should also declare
7 #  SOURCE_FILES with whatever Java files should be compiled
8 #
9 ##########################################################################
10
11
12 BUILDSCRIPT=../../../buildscript
13
14
15 COREPROFOVERFLOW= #-coreprof-checkoverflow
16 USECOREPROF= #-coreprof $(COREPROFOVERFLOW) \
17         -coreprof-eventwords 1024*1024*128 \
18         -coreprof-enable cpe_main \
19         -coreprof-enable cpe_taskexecute \
20         -coreprof-enable cpe_taskdispatch \
21         -coreprof-enable cpe_rcr_traverse
22 #       -coreprof-enable cpe_runmalloc \
23 #       -coreprof-enable cpe_taskretire \
24         -coreprof-enable cpe_workschedsubmit \
25         -coreprof-enable cpe_workschedgrab \
26         -coreprof-enable cpe_poolalloc \
27         -coreprof-enable cpe_preparememq \
28         -coreprof-enable cpe_runfree \
29         -coreprof-enable cpe_count_poolalloc \
30         -coreprof-enable cpe_count_poolreuse \
31         -coreprof-enable cpe_taskstallvar \
32         -coreprof-enable cpe_taskstallmem
33
34
35
36 USEOOO= -ooojava $(NUM_OOO_WORKERS) 2      -squeue #-ooodebug-disable-task-mem-pool
37 USERCR= -ooojava $(NUM_RCR_WORKERS) 2 -rcr -squeue -ooodebug
38 OOODEBUG= -ooodebug -printlinenum
39 RCRDEBUG= -rcr_debug -printlinenum
40 RCRDEBUGV= -rcr_debug_verbose -printlinenum
41 BSFLAGS= -compiler-heapsize-mb 12000   -64bit -mainclass $(PROGRAM) -garbagestats -joptimize -noloop -optimize -nolock -debug #-nooptimize #src-after-pp
42
43
44 CHECKPOINTSTO= -printlinenum -pointsto-check-v-runtime -debug
45
46
47 DRELEASEMODE=-disjoint-release-mode -disjoint-dvisit-stack-callees-on-top -disjoint-alias-file aliases.txt tabbed
48 DISJOINT= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) #-disjoint-desire-determinism 
49
50
51 #####################################
52 #
53 #  There are a lot of options for
54 #  output and debugging disjoint
55 #  reachability analysis:
56 #
57 #####################################
58
59 # -disjoint-write-dots final (get the final reach graph for each method, or use "all" instead of "final" to get every updated result)
60 # -disjoint-write-ihms       (get the initial heap model (IHM) for callees to see what the analysis started with, and which call sites contributed)
61 # -disjoint-debug-scheduling (use to get messages about WHY a method is rescheduled for analysis)
62
63 # to use -disjoint-debug-callsite flag, arguments are:
64 # 1. callee symbol, ex: MainClass.foo() has symbol "foo"
65 # 2. caller symbol
66 # 3. numCallSiteVisitsToSkip, the analysis sometimes revisits a call site many, MANY times, but usually use 1
67 # 4. numCallSiteVisitsToCapture, if you choose a really high number you'll get every visit, could be a lot
68 # 5. true/false, whether to immediately halt compiler after number of visits specified have been captured
69 # EX:
70 # -disjoint-debug-callsite foo main 1 1 true
71
72 # to use -disjoint-debug-snap-method, arguments are:
73 # 1. method symbol to take program point snapshots of
74 # 2. numVisitsToSkip, sometimes the early visits tell you nothing, context is too empty
75 # 3. numVisitsToCapture
76 # 4. true/false, halt compiler after number of specified visits are captured
77 # EX: (skip first 10 visits, capture the next 3, then halt)
78 # -disjoint-debug-snap-method Remove 10 3 true
79
80 DISJOINTDEBUG= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) \
81         -justanalyze \
82         -disjoint-count-graph-elements
83 #       -disjoint-disable-global-sweep \
84 #       -disjoint-disable-strong-update
85 #       -disjoint-summarize-per-class
86 #       -disjoint-disable-predicates \
87 #
88 #       -disjoint-write-dots final
89 #       -do-definite-reach-analysis \
90 #       -disjoint-debug-scheduling
91 #       -disjoint-debug-callsite Barneshut.Insert Barneshut.run 50 500 true
92 #       -disjoint-debug-snap-method ArrayIndexedGraph.createNode 1 100 true \
93 #       -disjoint-write-dots final \
94 #       -flatirusermethods \
95 #       -disjoint-write-ihms \
96 #       -disjoint-write-initial-contexts \
97 #       -disjoint-debug-snap-method String.indexOf 1 1000 true
98 #       -disjoint-debug-callsite String.concat2 FileInputStream.readLine 1 1000 true \
99 #       -disjoint-debug-snap-method String.concat2 1 1000 true
100 #       -disjoint-debug-snap-method FileInputStream.readLine 1 1000 true
101 #       -disjoint-write-all-node-graphs
102 #
103 #       -disjoint-debug-callsite String.toString String.valueOf 1 1000 true \
104 #       -disjoint-desire-determinism
105 #       -disjoint-debug-callsite Demand.add Lateral.compute 1 1000 true
106 #       -disjoint-debug-snap-method ComputeCenterOfMass 6 2 true
107
108
109
110
111 default:
112         $(BUILDSCRIPT) -nojava $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES)
113
114 single-remake-c:
115         $(BUILDSCRIPT) -nojava -thread $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES) 
116
117 rcr-remake-c:
118         $(BUILDSCRIPT) -nojava $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
119
120 check-remake-c:
121         $(BUILDSCRIPT) -nojava $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(DISJOINTDEBUG) $(CHECKPOINTSTO) -o $(PROGRAM)c -builddir chk $(SOURCE_FILES)
122
123
124
125 single: $(PROGRAM)s.bin
126
127 $(PROGRAM)s.bin: $(SOURCE_FILES) ../master-makefile
128         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES)
129
130
131 check-pointsto: $(PROGRAM)c.bin
132
133 $(PROGRAM)c.bin: $(SOURCE_FILES) ../master-makefile
134         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(DISJOINTDEBUG) $(CHECKPOINTSTO) -o $(PROGRAM)c -builddir chk $(SOURCE_FILES)
135
136
137
138 disjoint: $(SOURCE_FILES) ../master-makefile
139         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(DISJOINT) -justanalyze -count-visits $(SOURCE_FILES)
140
141 disjoint-defreach: $(SOURCE_FILES) ../master-makefile
142         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(DISJOINT) -justanalyze -count-visits -do-definite-reach-analysis $(SOURCE_FILES)
143
144 ooo-defreach: $(SOURCE_FILES) ../master-makefile
145         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINTDEBUG) -do-definite-reach-analysis -o $(PROGRAM)d -builddir def  $(SOURCE_FILES) 
146
147
148
149 ooo: $(PROGRAM)p.bin
150
151 $(PROGRAM)p.bin: $(SOURCE_FILES) ../master-makefile
152         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES) 
153
154 ooo-debug: $(SOURCE_FILES) ../master-makefile
155         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(OOODEBUG) $(DISJOINTDEBUG) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES) 
156
157
158 disjoint-debug: $(SOURCE_FILES) ../master-makefile
159         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINTDEBUG) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES)
160
161 rcr: $(SOURCE_FILES) ../master-makefile
162         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
163
164
165 rcrpointer: $(SOURCE_FILES) ../master-makefile
166         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) -pointer $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
167
168 rcr-debug: $(SOURCE_FILES) ../master-makefile
169         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(OOODEBUG) $(RCRDEBUG) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
170
171 rcrpointer-debug: $(SOURCE_FILES) ../master-makefile
172         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) -pointer $(OOODEBUG) $(RCRDEBUG) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
173
174
175 rcr-debug-v: $(SOURCE_FILES) ../master-makefile
176         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(RCRDEBUGV) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
177
178 clean:
179         rm -f  $(PROGRAM)p.bin $(PROGRAM)s.bin $(PROGRAM)r.bin $(PROGRAM)c.bin $(PROGRAM)d.bin
180         rm -fr par sing rcr chk def tmpbuilddirectory
181         rm -f tmp.c
182         rm -f  *~
183         rm -f  *.dot
184         rm -f  *.png
185         rm -f  *.txt
186         rm -f  aliases.txt
187         rm -f  mlpReport*txt
188         rm -f  results*txt
189         rm -f *log
190         rm -f coreprof.dat
191         rm -f trace.out