5 echo -singleTM single machine committing transactions
6 echo -stmdebug STM debug
7 echo "-stmstats prints single machine commit (stm) statistics for the benchmark"
8 echo -fastmemcpy use fast memcpy
9 echo -sandbox sandbox transactions
10 echo -dcopts conflict optimizations for transactional memory
11 echo -transstats generates transaction stats on commits and aborts
12 echo -inlineatomic depth inline methods inside of transactions to specified depth
13 echo "-stmarray partial array treatment"
14 echo "-dualview dual view of arrays"
15 echo "-hybrid use fission only when it looks like a good choice"
16 echo "-numa numa aware"
17 echo "-eventmonitor turn on transaction event trace recording"
20 echo -coreprof, turn on profiling API
21 echo -coreprof-eventwords NUM, space in words/thread for coreprof events
22 echo -coreprof-checkoverflow, ONLY use for debugging event overflow
23 echo -coreprof-enable EVENTNAME, only enable desired events to reduce overhead
24 echo EVENTNAME can be: cpe_main, cpe_runmalloc, cpe_runfree, cpe_count_poolalloc, cpe_count_poolreuse, cpe_workschedgrab, cpe_taskdispatch, cpe_taskexecute, cpe_taskretire, cpe_taskstallvar, cpe_taskstallmem
25 echo "-ooojava <numberofcores> <maxseseage>"
26 echo -ooodebug general OOOJava debugging messages
27 echo -ooodebug-disable-task-mem-pool this is a tricky module, disable for simpler runtime
28 echo -rcr turn on runtime conflict resolver
30 echo Disjoint Reachability Analysis options
31 echo -disjoint enable analysis
32 echo -disjoint-k set k-limit for heap nodes per allocation site
33 echo "-disjoint-write-dots <all/final> write reach graphs for all method sols. or only final sols."
34 echo -disjoint-write-initial-contexts write reach graphs for callee initial contexts from all call sites
35 echo -disjoint-write-ihms write reach graphs for each call site\'s Initial Heap Model
36 echo "-disjoint-alias-file <filename> <normal/tabbed> write sharing for normal human reading or LaTeX tabbed"
37 echo "-disjoint-debug-callsite <callee> <caller> <visit to start> <num caps> <T/F stop after>"
38 echo " To debug call site, give callee caller symbols (ie foo) the analysis visit to start capturing, num captures to take, and whether to halt analysis after capturing"
39 echo "-disjoint-debug-snap-method <method> <visit to start> <num caps> <T/F stop after>"
40 echo " To take snapshots at statements, give method symbol, the analysis visit to start capturing, num captures to take, and whether to halt analsyis after capturing"
41 echo "-disjoint-dvisit-stack use stack strat to visit descriptors (tasks or methods)"
42 echo -disjoint-dvisit-stack-callees-on-top alternate stack strat
43 echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors
44 echo -disjoint-desire-determinism set above interproc for determinism
45 echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
47 echo "-mlp <num cores> <max sese age> build mlp code"
48 echo -mlpdebug if mlp, report progress and interim results
51 echo -dsm distributed shared memory
52 echo -abortreaders abort readers immediately
53 echo -trueprob double - probabiltiy of true branch
54 echo -dsmcaching -enable caching in dsm runtime
56 echo BAMBOO Multicore options
57 echo -scheduling do task scheduling
58 echo -multicore generate multi-core version binary
59 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
60 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
61 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
62 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
63 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
64 echo -printscheduling print out scheduling graphs
65 echo -printschedulesim print out scheduling simulator result graphs
66 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
67 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
68 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
69 echo "-raw generate raw version binary (should be used together with -multicore)"
70 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
71 echo -multicoregc generate multi-core binary with garbage collection
72 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
73 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
74 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
75 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
76 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
77 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
78 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
79 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
80 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
81 echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)"
82 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
83 echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)"
84 echo "-gccacheadapt setup as cacheadaptable mode (should be used together with -multicoregc)"
85 echo -gcprofile build with gcprofile options
86 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
87 echo -accurateprofile build with accurate profile information including pre/post task processing info
88 echo -profile_interrupt build with profile information of interrupts
89 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
92 echo -abcclose turnoff array boundary checks
93 echo -builddir setup different build directory
94 echo -robustroot set up the ROBUSTROOT to directory other than default one
95 echo -readset turn on readset
96 echo -mac distributed shared memory mac support
97 echo -check generate check code
98 echo -dmalloc link in dmalloc
99 echo -64bit compile for 64 bit machine
100 echo -32bit compile for 32 bit machine
101 echo -joptimize java compiler optimizations
102 echo -noloop turnoff loop optimizations
103 echo -recover compile task code
104 echo -fastcheck fast checkpointing for Bristlecone
105 echo -specdir directory
106 echo -printflat print out flat representation
107 echo -selfloop task - this task cannot self loop forever
108 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
109 echo -taskstate do task state analysis
110 echo -tagstate do tag state analysis
111 echo -optional enable optional
112 echo -debug generate debug symbols
113 echo -prefetch do prefetch analysis
114 echo -heapsize-mb NUM set initial heap size in MB, default is 256
115 echo -garbagestats Print garbage collection statistics
116 echo -webinterface enable web interface
117 echo -runtimedebug printout runtime debug messages
118 echo "-thread use support for multiple threads"
119 echo "-optimize call gcc with -O9 (optimize)"
120 echo "-nooptimize call gcc with -O0 (do not optimize)"
121 echo -curdir directory
122 echo -mainclass class with main method
124 echo -nojava do not run bristlecone compiler
125 echo -instructionfailures inject code for instructionfailures
126 echo -profile build with profile options
127 echo "-enable-assertions execute assert statements during compilation"
128 echo -justanalyze exit after compiler analyses complete
129 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
130 echo "-disall execute to collect whole distribution"
131 echo "-disstart specify the start number of distribution information collection"
132 echo -assembly generate assembly
133 echo -recovery compile recovery code
134 echo -dsmtask support work and task class library
135 echo -recoverystats print out recovery record
139 tmpbuilddirectory="tmpbuilddirectory"
144 ROBUSTROOT=~/research/Robust/src
145 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
146 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
147 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
148 REPAIRROOT=~/research/Repair/RepairCompiler/
167 TILERAZLINUXFLAG=false
168 TILERAMEMPROFFLAG=false
177 ACCURATEPROFILEFLAG=false
178 PROFILEINTERRUPTFLAG=false
181 THREADSIMULATEFLAG=false;
182 MULTICOREGCFLAG=false;
183 GCMEMLOCALFLAG=false;
184 GCMEMFIXEDFLAG=false;
185 GCMEMMIXEDFLAG=false;
186 GCMEMGLOBALFLAG=false;
187 GCCACHELOCALFLAG=false;
188 GCCACHERANFLAG=false;
189 GCCONTROLLERNEARFLAG=false;
190 GCCONTROLLERREMOTEFLAG=false;
191 GCSMALLPAGESIZEFLAG=false;
192 GCLARGEPAGESIZEFLAG=false;
193 GCLARGEPAGESIZE2FLAG=false;
194 GCLARGESHAREDHEAPFLAG=false;
195 GCSMALLPAGESIZEFLAG2=false;
196 GCLARGESHAREDHEAPFLAG2=false;
197 GCCACHEADAPTFLAG=false
198 GCCACHEADAPTPOLICYFLAG=false
199 GCCACHEADAPTPOLICY=''
200 GCCACHESAMPLINGFLAG=false
211 EXITAFTERANALYSIS=false
214 TILERAN1COREFLAG=false
215 TILERA56COREFLAG=false
225 if [[ $1 = '-help' ]]
229 elif [[ $1 = '-justanalyze' ]]
231 EXITAFTERANALYSIS=true
232 elif [[ $1 = '-assembly' ]]
235 elif [[ $1 = '-abortreaders' ]]
238 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
239 JAVAOPTS="$JAVAOPTS -abortreaders"
240 elif [[ $1 = '-sandbox' ]]
243 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
244 JAVAOPTS="$JAVAOPTS -sandbox"
245 elif [[ $1 = '-numa' ]]
247 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
249 elif [[ $1 = '-robustroot' ]]
253 elif [[ $1 = '-builddir' ]]
255 tmpbuilddirectory="$2"
257 elif [[ $1 = '-nojava' ]]
260 elif [[ $1 = '-eventmonitor' ]]
262 JAVAOPTS="$JAVAOPTS -eventmonitor"
264 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
265 elif [[ $1 = '-garbagestats' ]]
267 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
268 elif [[ $1 = '-64bit' ]]
270 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
271 elif [[ $1 = '-32bit' ]]
273 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
274 elif [[ $1 = '-fastcheck' ]]
276 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
277 JAVAOPTS="$JAVAOPTS -fastcheck"
283 elif [[ $1 = '-mainclass' ]]
285 JAVAOPTS="$JAVAOPTS -mainclass $2"
287 elif [[ $1 = '-selfloop' ]]
289 JAVAOPTS="$JAVAOPTS -selfloop $2"
291 elif [[ $1 = '-excprefetch' ]]
293 JAVAOPTS="$JAVAOPTS -excprefetch $2"
295 elif [[ $1 = '-arraypad' ]]
297 JAVAOPTS="$JAVAOPTS -arraypad"
298 elif [[ $1 = '-dsm' ]]
300 JAVAOPTS="$JAVAOPTS -dsm"
302 elif [[ $1 = '-fastmemcpy' ]]
305 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
306 elif [[ $1 = '-singleTM' ]]
308 JAVAOPTS="$JAVAOPTS -singleTM"
309 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
311 elif [[ $1 = '-stmarray' ]]
313 JAVAOPTS="$JAVAOPTS -stmarray"
314 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
316 elif [[ $1 = '-dualview' ]]
318 JAVAOPTS="$JAVAOPTS -dualview"
319 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
321 elif [[ $1 = '-readset' ]]
323 JAVAOPTS="$JAVAOPTS -readset"
324 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
325 elif [[ $1 = '-stmdebug' ]]
327 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
328 elif [[ $1 = '-stmstats' ]]
330 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
331 elif [[ $1 = '-stmlog' ]]
333 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
334 elif [[ $1 = '-prefetch' ]]
336 JAVAOPTS="$JAVAOPTS -prefetch"
337 elif [[ $1 = '-transstats' ]]
339 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
340 elif [[ $1 = '-printflat' ]]
342 JAVAOPTS="$JAVAOPTS -printflat"
343 elif [[ $1 = '-trueprob' ]]
345 JAVAOPTS="$JAVAOPTS -trueprob $2"
347 elif [[ $1 = '-inlineatomic' ]]
349 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
351 elif [[ $1 = '-mac' ]]
353 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
354 elif [[ $1 = '-profile' ]]
357 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
358 elif [[ $1 = '-gcprofile' ]]
361 elif [[ $1 = '-gcprofile_s' ]]
364 elif [[ $1 = '-accurateprofile' ]]
366 ACCURATEPROFILEFLAG=true
367 elif [[ $1 = '-profile_interrupt' ]]
369 PROFILEINTERRUPTFLAG=true
370 elif [[ $1 = '-useio' ]]
373 elif [[ $1 = '-taskstate' ]]
375 JAVAOPTS="$JAVAOPTS -taskstate"
376 elif [[ $1 = '-tagstate' ]]
378 JAVAOPTS="$JAVAOPTS -tagstate"
379 elif [[ $1 = '-scheduling' ]]
381 JAVAOPTS="$JAVAOPTS -scheduling"
382 elif [[ $1 = '-multicore' ]]
385 JAVAOPTS="$JAVAOPTS -multicore"
386 elif [[ $1 = '-numcore' ]]
388 JAVAOPTS="$JAVAOPTS -numcore $2"
389 if [[ "$2" -gt "1" ]]
391 TILERAN1COREFLAG=true
392 if [[ "$2" -eq "56" ]]
394 TILERA56COREFLAG=true
398 elif [[ $1 = '-numcore4gc' ]]
400 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
403 elif [[ $1 = '-raw' ]]
406 JAVAOPTS="$JAVAOPTS -raw"
407 elif [[ $1 = '-tilera_bme' ]]
411 elif [[ $1 = '-tilera_zlinux' ]]
414 TILERAZLINUXFLAG=true
415 elif [[ $1 = '-tilera_memprof' ]]
417 TILERAMEMPROFFLAG=true
418 elif [[ $1 = '-tileraconfig' ]]
422 elif [[ $1 = '-cacheflush' ]]
425 elif [[ $1 = '-rawconfig' ]]
429 elif [[ $1 = '-interrupt' ]]
432 elif [[ $1 = '-abcclose' ]]
434 JAVAOPTS="$JAVAOPTS -abcclose"
435 elif [[ $1 = '-optional' ]]
437 JAVAOPTS="$JAVAOPTS -optional"
439 elif [[ $1 = '-multicoregc' ]]
442 JAVAOPTS="$JAVAOPTS -multicoregc"
443 elif [[ $1 = '-gcmem_local' ]]
446 elif [[ $1 = '-gcmem_fixed' ]]
449 elif [[ $1 = '-gcmem_mixed' ]]
452 elif [[ $1 = '-gcmem_global' ]]
455 elif [[ $1 = '-gccache_local' ]]
457 GCCACHELOCALFLAG=true
458 elif [[ $1 = '-gccache_ran' ]]
461 elif [[ $1 = '-gccontroller_near' ]]
463 GCCONTROLLERNEARFLAG=true
464 elif [[ $1 = '-gccontroller_remote' ]]
466 GCCONTROLLERREMOTEFLAG=true
467 elif [[ $1 = '-gcsmallpagesize' ]]
469 GCSMALLPAGESIZEFLAG=true
470 elif [[ $1 = '-gcsmallpagesize2' ]]
472 GCSMALLPAGESIZEFLAG2=true
473 elif [[ $1 = '-gclargepagesize' ]]
475 GCLARGEPAGESIZEFLAG=true
476 elif [[ $1 = '-gclargepagesize2' ]]
478 GCLARGEPAGESIZE2FLAG=true
479 elif [[ $1 = '-gclargesharedheap' ]]
481 GCLARGESHAREDHEAPFLAG=true
482 elif [[ $1 = '-gclargesharedheap2' ]]
484 GCLARGESHAREDHEAPFLAG2=true
485 elif [[ $1 = '-gccacheadapt' ]]
487 GCCACHEADAPTFLAG=true
488 elif [[ $1 = '-gccacheadaptpolicy' ]]
490 GCCACHEADAPTPOLICYFLAG=true
491 GCCACHEADAPTPOLICY="$2"
493 elif [[ $1 = '-gccachesampling' ]]
495 GCCACHESAMPLINGFLAG=true
496 elif [[ $1 = '-dmalloc' ]]
499 elif [[ $1 = '-recover' ]]
502 JAVAOPTS="$JAVAOPTS -task"
503 elif [[ $1 = '-useprofile' ]]
505 JAVAOPTS="$JAVAOPTS -useprofile $2"
507 elif [[ $1 = '-webinterface' ]]
509 JAVAOPTS="$JAVAOPTS -webinterface"
510 elif [[ $1 = '-instructionfailures' ]]
512 JAVAOPTS="$JAVAOPTS -instructionfailures"
513 elif [[ $1 = '-joptimize' ]]
515 JAVAOPTS="$JAVAOPTS -optimize"
516 elif [[ $1 = '-noloop' ]]
518 JAVAOPTS="$JAVAOPTS -noloop"
519 elif [[ $1 = '-dcopts' ]]
521 JAVAOPTS="$JAVAOPTS -dcopts"
522 elif [[ $1 = '-delaycomp' ]]
524 JAVAOPTS="$JAVAOPTS -delaycomp"
525 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
526 elif [[ $1 = '-hybrid' ]]
528 JAVAOPTS="$JAVAOPTS -hybrid"
529 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
530 elif [[ $1 = '-minimize' ]]
532 JAVAOPTS="$JAVAOPTS -minimize"
534 elif [[ $1 = '-ooojava' ]]
537 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
538 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
542 elif [[ $1 = '-ooodebug-disable-task-mem-pool' ]]
544 EXTRAOPTIONS="$EXTRAOPTIONS -DOOO_DISABLE_TASKMEMPOOL"
546 elif [[ $1 = '-heapsize-mb' ]]
548 EXTRAOPTIONS="$EXTRAOPTIONS -DINITIALHEAPSIZE_MB=($2)"
551 elif [[ $1 = '-rcr' ]]
553 JAVAOPTS="$JAVAOPTS -rcr"
555 EXTRAOPTIONS="$EXTRAOPTIONS -I$ROBUSTROOT/Runtime/oooJava"
558 elif [[ $1 = '-coreprof' ]]
561 JAVAOPTS="$JAVAOPTS -coreprof"
562 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
564 elif [[ $1 = '-coreprof-eventwords' ]]
566 EXTRAOPTIONS="$EXTRAOPTIONS -DCP_MAXEVENTWORDS=($2)"
569 elif [[ $1 = '-coreprof-checkoverflow' ]]
571 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF_CHECKOVERFLOW"
573 elif [[ $1 = '-coreprof-enable' ]]
575 EXTRAOPTIONS="$EXTRAOPTIONS -D$2"
578 elif [[ $1 = '-mlp' ]]
581 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
582 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
586 elif [[ $1 = '-mlpdebug' ]]
588 JAVAOPTS="$JAVAOPTS -mlpdebug"
590 elif [[ $1 = '-check' ]]
593 JAVAOPTS="$JAVAOPTS -conscheck"
594 elif [[ $1 = '-enable-assertions' ]]
596 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
597 elif [[ $1 = '-specdir' ]]
603 elif [[ $1 = '-debug' ]]
606 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
607 elif [[ $1 = '-rawpath' ]]
610 elif [[ $1 = '-runtimedebug' ]]
612 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
613 elif [[ $1 = '-dsmcaching' ]]
615 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
616 elif [[ $1 = '-rangeprefetch' ]]
618 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
619 elif [[ $1 = '-nooptimize' ]]
621 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
622 elif [[ $1 = '-optimize' ]]
624 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
625 elif [[ $1 = '-thread' ]]
627 JAVAOPTS="$JAVAOPTS -thread"
628 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
630 elif [[ $1 = '-recovery' ]]
632 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
634 elif [[ $1 = '-recoverystats' ]]
636 JAVAOPTS="$JAVAOPTS -recoverystats"
637 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
638 elif [[ $1 = '-distributioninfo' ]]
640 JAVAOPTS="$JAVAOPTS -distributioninfo"
641 elif [[ $1 = '-disall' ]]
643 JAVAOPTS="$JAVAOPTS -disall"
644 elif [[ $1 = '-disstart' ]]
646 JAVAOPTS="$JAVAOPTS -disstart $2"
648 elif [[ $1 = '-noc' ]]
651 elif [[ $1 = '-curdir' ]]
655 elif [[ $1 = '-outputdir' ]]
657 JAVAOPTS="$JAVAOPTS -outputdir $2"
660 SRCFILES="$SRCFILES $1"
665 BUILDDIR="$CURDIR/$tmpbuilddirectory"
667 BAMBOORUNTIME=$ROBUSTROOT/Runtime/bamboo
675 if $CHECKFLAG #Generate structure files for repair tool
677 JAVAOPTS="$JAVAOPTS -struct structfile"
687 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
689 #base bristlecone files
690 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
696 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
699 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
702 #threading java stuff
703 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
706 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
709 # Build bristlecone/java sources
713 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
714 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
715 -dir $BUILDDIR $JAVAOPTS $SRCFILES
719 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
722 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
723 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
730 if $EXITAFTERANALYSIS
735 # Build all of the consistency specs
737 if $CHECKFLAG # CHECKFLAG
740 mkdir $BUILDDIR/specdir
741 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
743 echo > $BUILDDIR/specs
745 # compile specs into C code
746 for i in * # iterate over all directories
748 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
751 cat $BUILDDIR/structfile.struct $i.label > $i.struct
752 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
753 cp size.[c,h] $BUILDDIR/specdir
754 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
755 echo $i >> $BUILDDIR/specs
757 done # iterate over all directories
763 echo > $BUILDDIR/checkers.h
764 for i in `cat $BUILDDIR/specs`
766 gcc -O0 -g -fbounds-check -c $i\_aux.c
767 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
771 #build and link everything
776 MAKEFILE="Makefile.raw"
782 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
786 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
791 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
796 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
800 then # profile version
801 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
804 if $ACCURATEPROFILEFLAG
805 then # accurateprofile version
806 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
811 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
815 then #INTERRUPT version
816 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
817 fi #INTERRUPT version
821 MAKEFILE="$MAKEFILE.io"
822 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
824 MAKEFILE="$MAKEFILE.$RAWCONFIG"
827 cp $BAMBOORUNTIME/RAW/$MAKEFILE ./Makefile
833 cp ../Runtime/coreprof/*.c ./coreprof/
834 cp ../Runtime/coreprof/*.h ./coreprof/
835 cp $BAMBOORUNTIME/RAW/*.c ./
836 cp $BAMBOORUNTIME/RAW/*.h ./
837 cp $BAMBOORUNTIME/RAW/*.S ./
838 cp $BAMBOORUNTIME/RAW/*.s ./
839 cp ../$tmpbuilddirectory/*.c ./
840 cp ../$tmpbuilddirectory/*.h ./
846 TILERADIR="$CURDIR/tilera"
850 MAKEFILE="Makefile.tilera.$TILERACONFIG"
851 SIMHVC="sim.hvc.$TILERACONFIG"
852 PCIHVC="pci.hvc.$TILERACONFIG"
857 elif $TILERAZLINUXFLAG
858 then # TILERAZLINUXFLAG
859 TILERA_INDIR="ZLinux"
860 MAKEFILE="Makefile.tilera.$TILERACONFIG"
868 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
870 if $TILERAMEMPROFFLAG
871 then # not only with 1 core
872 PCIHVC="$PCIHVC.memprof"
873 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
878 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
879 elif $TILERAZLINUXFLAG
880 then # TILERAZLINUXFLAG
881 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
886 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
891 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
896 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
900 then # profile version
901 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
904 if $ACCURATEPROFILEFLAG
905 then # accurateprofile version
906 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
909 if $PROFILEINTERRUPTFLAG
910 then # profile_interrupt version
911 TILERACFLAGS="${TILERACFLAGS} -DPROFILE_INTERRUPT"
916 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
920 then #INTERRUPT version
921 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
922 fi #INTERRUPT version
925 then #MULTICOREGC version
926 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
930 then # GC_PROFILE version
931 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
935 then # GC_PROFILE_S version
936 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
940 then # SMEMLOCAL version
941 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
945 then # SMEMFIXED version
946 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
950 then # SMEMMIXED version
951 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
955 then # SMEMGLOBAL version
956 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
960 then # CACHE_LOCAL version
961 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
965 then # CACHE_RAN version
966 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
969 if $GCCONTROLLERNEARFLAG
970 then # CONTROLLER_NEAR version
971 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
974 if $GCCONTROLLERREMOTEFLAG
975 then # CONTROLLER_REMOTE version
976 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
979 if $GCSMALLPAGESIZEFLAG
980 then # GC_SMALLPAGESIZE version
981 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
984 if $GCLARGEPAGESIZEFLAG
985 then # GC_LARGEPAGESIZE version
986 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
989 if $GCLARGEPAGESIZE2FLAG
990 then # GC_LARGEPAGESIZE2 version
991 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE2"
994 if $GCLARGESHAREDHEAPFLAG
995 then # GC_LARGESHAREDHEAP version
996 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
999 if $GCSMALLPAGESIZEFLAG2
1000 then # GC_SMALLPAGESIZE2 version
1001 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
1004 if $GCLARGESHAREDHEAPFLAG2
1005 then # GC_LARGESHAREDHEAP2 version
1006 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
1009 if $GCCACHEADAPTFLAG
1010 then # GC_CACHE_ADAPT version
1011 TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_ADAPT"
1014 if $GCCACHEADAPTPOLICYFLAG
1015 then # GC_CACHE_ADAPT version
1016 TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_ADAPT_POLICY${GCCACHEADAPTPOLICY}"
1019 if $GCCACHESAMPLINGFLAG
1020 then # GC_CACHE_ADAPT version
1021 TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_SAMPLING"
1024 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
1026 then # TILERABMEFLAG
1027 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
1028 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
1029 if $TILERA56COREFLAG
1031 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc.56 ./bamboo-vmlinux-pci.hvc.56
1033 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
1036 cp ../Runtime/Queue.c ./
1037 cp ../Runtime/file.c ./
1038 cp ../Runtime/math.c ./
1039 cp ../Runtime/object.c ./
1040 cp ../Runtime/GenericHashtable.c ./
1041 cp ../Runtime/SimpleHash.c ./
1042 cp ../Runtime/ObjectHash.c ./
1043 cp ../Runtime/socket.c ./
1044 cp ../Runtime/mem.c ./
1045 cp ../Runtime/GenericHashtable.h ./
1046 cp ../Runtime/mem.h ./
1047 cp ../Runtime/object.h ./
1048 cp ../Runtime/ObjectHash.h ./
1049 cp ../Runtime/Queue.h ./
1050 cp ../Runtime/runtime.h ./
1051 cp ../Runtime/SimpleHash.h ./
1053 cp ../Runtime/coreprof/coreprof.c ./coreprof/
1054 cp ../Runtime/coreprof/coreprof.h ./coreprof/
1055 cp $BAMBOORUNTIME/multicoretask.c ./
1056 cp $BAMBOORUNTIME/multicoreruntime.c ./
1057 cp $BAMBOORUNTIME/GCSharedHash.c ./
1058 cp $BAMBOORUNTIME/multicoregarbage.c ./
1059 cp $BAMBOORUNTIME/MGCHash.c ./
1060 cp $BAMBOORUNTIME/multicoreruntime.h ./
1061 cp $BAMBOORUNTIME/GCSharedHash.h ./
1062 cp $BAMBOORUNTIME/multicoregc.h ./
1063 cp $BAMBOORUNTIME/multicoregarbage.h ./
1064 cp $BAMBOORUNTIME/multicorehelper.h ./
1065 cp $BAMBOORUNTIME/MGCHash.h ./
1066 cp $BAMBOORUNTIME/multicorecache.h ./
1067 cp ../Tilera/Runtime/*.c ./
1068 cp ../Tilera/Runtime/*.h ./
1069 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
1070 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
1071 if $TILERAZLINUXFLAG
1072 then # TILERAZLINUXFLAG
1073 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
1075 #if $TILERAMEMPROFFLAG
1076 #then # TILERAMEMPROFFLAG
1077 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
1079 cp ../Tilera/lib/* ./
1080 cp ../$tmpbuilddirectory/*.c ./
1081 cp ../$tmpbuilddirectory/*.h ./
1085 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
1088 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
1093 RUNTIMEFILE="$BAMBOORUNTIME/multicoreruntime.c $BAMBOORUNTIME/multicoretask.c"
1094 INCLUDES="$INCLUDES -I$BAMBOORUNTIME"
1096 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
1099 FILES="$RUNTIMEFILE \
1100 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1101 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1102 $ROBUSTROOT/Runtime/ObjectHash.c \
1103 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1104 $ROBUSTROOT/Runtime/math.c \
1105 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1109 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1114 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1119 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1126 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1127 FILES="$FILES $DSMRECOVERYRUNTIME/trans.c $DSMRECOVERYRUNTIME/mcpileq.c $DSMRECOVERYRUNTIME/objstr.c $DSMRECOVERYRUNTIME/dstm.c $DSMRECOVERYRUNTIME/altmlookup.c $DSMRECOVERYRUNTIME/clookup.c $DSMRECOVERYRUNTIME/llookup.c $DSMRECOVERYRUNTIME/tlookup.c $DSMRECOVERYRUNTIME/threadnotify.c $DSMRECOVERYRUNTIME/dstmserver.c $DSMRECOVERYRUNTIME/plookup.c $DSMRECOVERYRUNTIME/ip.c $DSMRECOVERYRUNTIME/queue.c $DSMRECOVERYRUNTIME/altprelookup.c $DSMRECOVERYRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRECOVERYRUNTIME/sockpool.c $DSMRECOVERYRUNTIME/addUdpEnhance.c $DSMRECOVERYRUNTIME/signal.c $DSMRECOVERYRUNTIME/gCollect.c $DSMRECOVERYRUNTIME/addPrefetchEnhance.c $DSMRECOVERYRUNTIME/dsmlock.c $DSMRECOVERYRUNTIME/translist.c $DSMRECOVERYRUNTIME/paxos.c"
1129 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1130 FILES="$FILES $DSMRUNTIME/trans.c $DSMRUNTIME/mcpileq.c $DSMRUNTIME/objstr.c $DSMRUNTIME/dstm.c $DSMRUNTIME/clookup.c $DSMRUNTIME/llookup.c $DSMRUNTIME/threadnotify.c $DSMRUNTIME/dstmserver.c $DSMRUNTIME/plookup.c $DSMRUNTIME/ip.c $DSMRUNTIME/queue.c $DSMRUNTIME/altprelookup.c $DSMRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRUNTIME/sockpool.c $DSMRUNTIME/addUdpEnhance.c $DSMRUNTIME/signal.c $DSMRUNTIME/gCollect.c $DSMRUNTIME/addPrefetchEnhance.c $DSMRUNTIME/dsmlock.c $DSMRUNTIME/prefetch.c $DSMRUNTIME/altmlookup.c"
1136 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1137 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1144 FILES="$FILES $DSMRUNTIME/sandbox.c"
1146 FILES="$FILES $STMRUNTIME/sandbox.c"
1152 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1157 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1162 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1167 FILES="$FILES $tmpbuilddirectory/RuntimeConflictResolver.c $ROBUSTROOT/Runtime/oooJava/hashRCR.c $ROBUSTROOT/Runtime/oooJava/Queue_RCR.c"
1172 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1173 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1174 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1179 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1182 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1184 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1187 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1189 if $THREADSIMULATEFLAG
1191 # -lpthread for pthread functions, -lrt for message queue functions
1192 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1198 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1199 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1204 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1209 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1210 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1215 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1219 echo EXTRAOPTIONS=$EXTRAOPTIONS
1223 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1224 -c $tmpbuilddirectory/methods.c -lm
1229 gcc $INCLUDES $EXTRAOPTIONS \
1230 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1232 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1233 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin