1 ##########################################################################
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
9 ##########################################################################
12 BUILDSCRIPT=../../../buildscript
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
35 USEOOO= -ooojava $(NUM_OOO_WORKERS) 2 -ooodebug -squeue #-ooodebug-disable-task-mem-pool
36 USERCR= -ooojava $(NUM_RCR_WORKERS) 2 -rcr -ooodebug -squeue
38 RCRDEBUGV= -rcr_debug_verbose
39 BSFLAGS= -64bit -mainclass $(PROGRAM) -heapsize-mb 8000 -garbagestats -joptimize -noloop -optimize -debug #-nooptimize #src-after-pp
42 DRELEASEMODE=-disjoint-release-mode -disjoint-dvisit-stack-callees-on-top -disjoint-alias-file aliases.txt tabbed
43 DISJOINT= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) #-disjoint-desire-determinism
46 #####################################
48 # There are a lot of options for
49 # output and debugging disjoint
50 # reachability analysis:
52 #####################################
54 # -disjoint-write-dots final (get the final reach graph for each method, or use "all" instead of "final" to get every updated result)
55 # -disjoint-write-ihms (get the initial heap model (IHM) for callees to see what the analysis started with, and which call sites contributed)
56 # -disjoint-debug-scheduling (use to get messages about WHY a method is rescheduled for analysis)
58 # to use -disjoint-debug-callsite flag, arguments are:
59 # 1. callee symbol, ex: MainClass.foo() has symbol "foo"
61 # 3. numCallSiteVisitsToSkip, the analysis sometimes revisits a call site many, MANY times, but usually use 1
62 # 4. numCallSiteVisitsToCapture, if you choose a really high number you'll get every visit, could be a lot
63 # 5. true/false, whether to immediately halt compiler after number of visits specified have been captured
65 # -disjoint-debug-callsite foo main 1 1 true
67 # to use -disjoint-debug-snap-method, arguments are:
68 # 1. method symbol to take program point snapshots of
69 # 2. numVisitsToSkip, sometimes the early visits tell you nothing, context is too empty
70 # 3. numVisitsToCapture
71 # 4. true/false, halt compiler after number of specified visits are captured
72 # EX: (skip first 10 visits, capture the next 3, then halt)
73 # -disjoint-debug-snap-method Remove 10 3 true
75 DISJOINTDEBUG= -justanalyze -disjoint -disjoint-k 1 -enable-assertions \
76 -disjoint-debug-callsite createNode run 100 50 false
77 # -disjoint-desire-determinism
78 # -disjoint-debug-snap-method ComputeCenterOfMass 6 2 true
79 # -disjoint-debug-scheduling
86 $(BUILDSCRIPT) -nojava $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES)
89 $(BUILDSCRIPT) -nojava -thread $(BSFLAGS) $(USECOREPROF) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES)
92 $(BUILDSCRIPT) -nojava $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(DISJOINT) -o $(PROGRAM)r -builddir rcr $(SOURCE_FILES)
94 single: $(PROGRAM)s.bin
96 $(PROGRAM)s.bin: $(SOURCE_FILES) ../master-makefile
97 $(BUILDSCRIPT) -thread $(BSFLAGS) $(USECOREPROF) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES)
101 $(PROGRAM)p.bin: $(SOURCE_FILES) ../master-makefile
102 $(BUILDSCRIPT) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES)
104 disjoint-debug: $(SOURCE_FILES) ../master-makefile
105 $(BUILDSCRIPT) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINTDEBUG) -o $(PROGRAM)p -builddir par $(SOURCE_FILES)
107 rcr: $(SOURCE_FILES) ../master-makefile
108 $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(DISJOINT) -o $(PROGRAM)r -builddir rcr $(SOURCE_FILES)
111 rcrpointer: $(SOURCE_FILES) ../master-makefile
112 $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) -pointer $(DISJOINT) -o $(PROGRAM)r -builddir rcr $(SOURCE_FILES)
114 rcr-debug: $(SOURCE_FILES) ../master-makefile
115 $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(RCRDEBUG) $(DISJOINT) -o $(PROGRAM)r -builddir rcr $(SOURCE_FILES)
117 rcr-debug-v: $(SOURCE_FILES) ../master-makefile
118 $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USERCR) $(RCRDEBUGV) $(DISJOINT) -o $(PROGRAM)r -builddir rcr $(SOURCE_FILES)
121 rm -f $(PROGRAM)p.bin $(PROGRAM)s.bin $(PROGRAM)r.bin