456c855e041253ce3e1db73cc7351459a3b55f03
[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 USEOOO= -ooojava $(NUM_OOO_WORKERS) 2 -squeue #-ooodebug-disable-task-mem-pool
36 USERCR= -ooojava $(NUM_RCR_WORKERS) 2 -rcr -squeue -ooodebug
37 OOODEBUG= -ooodebug -printlinenum
38 RCRDEBUG= -rcr_debug -printlinenum
39 RCRDEBUGV= -rcr_debug_verbose -printlinenum
40 BSFLAGS= -64bit -mainclass $(PROGRAM)  -heapsize-mb 8000 -garbagestats -joptimize -noloop -optimize -nolock -debug #-nooptimize #src-after-pp
41
42
43 DRELEASEMODE=-disjoint-release-mode -disjoint-dvisit-stack-callees-on-top -disjoint-alias-file aliases.txt tabbed
44 DISJOINT= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) #-disjoint-desire-determinism
45
46
47 #####################################
48 #
49 #  There are a lot of options for
50 #  output and debugging disjoint
51 #  reachability analysis:
52 #
53 #####################################
54
55 # -disjoint-write-dots final (get the final reach graph for each method, or use "all" instead of "final" to get every updated result)
56 # -disjoint-write-ihms       (get the initial heap model (IHM) for callees to see what the analysis started with, and which call sites contributed)
57 # -disjoint-debug-scheduling (use to get messages about WHY a method is rescheduled for analysis)
58
59 # to use -disjoint-debug-callsite flag, arguments are:
60 # 1. callee symbol, ex: MainClass.foo() has symbol "foo"
61 # 2. caller symbol
62 # 3. numCallSiteVisitsToSkip, the analysis sometimes revisits a call site many, MANY times, but usually use 1
63 # 4. numCallSiteVisitsToCapture, if you choose a really high number you'll get every visit, could be a lot
64 # 5. true/false, whether to immediately halt compiler after number of visits specified have been captured
65 # EX:
66 # -disjoint-debug-callsite foo main 1 1 true
67
68 # to use -disjoint-debug-snap-method, arguments are:
69 # 1. method symbol to take program point snapshots of
70 # 2. numVisitsToSkip, sometimes the early visits tell you nothing, context is too empty
71 # 3. numVisitsToCapture
72 # 4. true/false, halt compiler after number of specified visits are captured
73 # EX: (skip first 10 visits, capture the next 3, then halt)
74 # -disjoint-debug-snap-method Remove 10 3 true
75
76 DISJOINTDEBUG= -justanalyze -disjoint -disjoint-k 1 -enable-assertions \
77         -disjoint-debug-callsite createNode run 100 50 false
78 #       -disjoint-desire-determinism
79 #       -disjoint-debug-snap-method ComputeCenterOfMass 6 2 true
80 #       -disjoint-debug-scheduling
81 #       -flatirusermethods
82
83
84
85
86 default:
87         $(BUILDSCRIPT) -nojava $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES)
88
89 single-remake-c:
90         $(BUILDSCRIPT) -nojava -thread $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES) 
91
92 rcr-remake-c:
93         $(BUILDSCRIPT) -nojava $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
94
95 single: $(PROGRAM)s.bin
96
97 $(PROGRAM)s.bin: $(SOURCE_FILES) ../master-makefile
98         $(BUILDSCRIPT) -thread $(BMFLAGS) $(BSFLAGS) $(USECOREPROF)                       -o $(PROGRAM)s -builddir sing $(SOURCE_FILES) 
99
100 ooo: $(PROGRAM)p.bin
101
102 $(PROGRAM)p.bin: $(SOURCE_FILES) ../master-makefile
103         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES) 
104
105 ooo-debug: $(SOURCE_FILES) ../master-makefile
106         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(OOODEBUG) $(DISJOINT) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES) 
107
108
109 disjoint-debug: $(SOURCE_FILES) ../master-makefile
110         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINTDEBUG) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES) 
111
112 rcr: $(SOURCE_FILES) ../master-makefile
113         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
114
115
116 rcrpointer: $(SOURCE_FILES) ../master-makefile
117         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) -pointer $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
118
119 rcr-debug: $(SOURCE_FILES) ../master-makefile
120         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(OOODEBUG) $(RCRDEBUG) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
121
122 rcrpointer-debug: $(SOURCE_FILES) ../master-makefile
123         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) -pointer $(OOODEBUG) $(RCRDEBUG) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
124
125
126 rcr-debug-v: $(SOURCE_FILES) ../master-makefile
127         $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(RCRDEBUGV) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
128
129 clean:
130         rm -f  $(PROGRAM)p.bin $(PROGRAM)s.bin $(PROGRAM)r.bin
131         rm -fr par sing rcr
132         rm -f tmp.c
133         rm -f  *~
134         rm -f  *.dot
135         rm -f  *.png
136         rm -f  *.txt
137         rm -f  aliases.txt
138         rm -f  mlpReport*txt
139         rm -f  results*txt
140         rm -f *log
141         rm -f coreprof.dat
142         rm -f trace.out