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_poolalloc, cpe_count_poolalloc, cpe_count_poolreuse, cpe_workschedgrab, cpe_taskdispatch, cpe_preparememq, 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 "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
59 echo "-disall execute to collect whole distribution"
60 echo "-disstart specify the start number of distribution information collection"
61 echo -multicore generate multi-core version binary
62 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
63 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
64 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
65 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
66 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
67 echo -printscheduling print out scheduling graphs
68 echo -printschedulesim print out scheduling simulator result graphs
69 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
70 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
71 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
72 echo "-raw generate raw version binary (should be used together with -multicore)"
73 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
74 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
75 echo -accurateprofile build with accurate profile information including pre/post task processing info
76 echo -profile_interrupt build with profile information of interrupts
77 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
79 echo Multicore GC options
80 echo -multicoregc generate multi-core binary with garbage collection
81 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
82 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
83 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
84 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
85 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
86 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
87 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
88 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
89 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
90 echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)"
91 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
92 echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)"
93 echo "-gccacheadapt setup as cacheadaptable mode (should be used together with -multicoregc)"
94 echo -gcprofile build with gcprofile options
95 echo -mgc generate Multicore GC binary without task stuff
98 echo -abcclose turnoff array boundary checks
99 echo -builddir setup different build directory
100 echo -robustroot set up the ROBUSTROOT to directory other than default one
101 echo -readset turn on readset
102 echo -mac distributed shared memory mac support
103 echo -check generate check code
104 echo -dmalloc link in dmalloc
105 echo -64bit compile for 64 bit machine
106 echo -32bit compile for 32 bit machine
107 echo -joptimize java compiler optimizations
108 echo -noloop turnoff loop optimizations
109 echo -recover compile task code
110 echo -fastcheck fast checkpointing for Bristlecone
111 echo -specdir directory
112 echo -printflat print out flat representation
113 echo -selfloop task - this task cannot self loop forever
114 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
115 echo -taskstate do task state analysis
116 echo -tagstate do tag state analysis
117 echo -optional enable optional
118 echo -debug generate debug symbols
119 echo -prefetch do prefetch analysis
120 echo -heapsize-mb NUM set initial heap size in MB, default is 256
121 echo -garbagestats Print garbage collection statistics
122 echo -webinterface enable web interface
123 echo -runtimedebug printout runtime debug messages
124 echo "-thread use support for multiple threads"
125 echo "-optimize call gcc with -O9 (optimize)"
126 echo "-nooptimize call gcc with -O0 (do not optimize)"
127 echo -curdir directory
128 echo -mainclass class with main method
130 echo -nojava do not run bristlecone compiler
131 echo -instructionfailures inject code for instructionfailures
132 echo -profile build with profile options
133 echo "-enable-assertions execute assert statements during compilation"
134 echo -justanalyze exit after compiler analyses complete
135 echo -assembly generate assembly
136 echo -recovery compile recovery code
137 echo -dsmtask support work and task class library
138 echo -recoverystats print out recovery record
139 echo -src-after-pp prints source code after preprocessor to tmp.c
143 tmpbuilddirectory="tmpbuilddirectory"
149 ROBUSTROOT=~/research/Robust/src
150 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
151 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
152 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
153 REPAIRROOT=~/research/Repair/RepairCompiler/
172 TILERAZLINUXFLAG=false
173 TILERAMEMPROFFLAG=false
182 ACCURATEPROFILEFLAG=false
183 PROFILEINTERRUPTFLAG=false
186 THREADSIMULATEFLAG=false;
187 MULTICOREGCFLAG=false;
188 GCMEMLOCALFLAG=false;
189 GCMEMFIXEDFLAG=false;
190 GCMEMMIXEDFLAG=false;
191 GCMEMGLOBALFLAG=false;
192 GCCACHELOCALFLAG=false;
193 GCCACHERANFLAG=false;
194 GCCONTROLLERNEARFLAG=false;
195 GCCONTROLLERREMOTEFLAG=false;
196 GCSMALLPAGESIZEFLAG=false;
197 GCLARGEPAGESIZEFLAG=false;
198 GCLARGEPAGESIZE2FLAG=false;
199 GCLARGESHAREDHEAPFLAG=false;
200 GCSMALLPAGESIZEFLAG2=false;
201 GCLARGESHAREDHEAPFLAG2=false;
202 GCCACHEADAPTFLAG=false
203 GCCACHEADAPTPOLICYFLAG=false
204 GCCACHEADAPTPOLICY=''
205 GCCACHESAMPLINGFLAG=false
217 EXITAFTERANALYSIS=false
220 TILERAN1COREFLAG=false
221 TILERA56COREFLAG=false
231 if [[ $1 = '-help' ]]
236 elif [[ $1 = '-justanalyze' ]]
238 EXITAFTERANALYSIS=true
240 elif [[ $1 = '-src-after-pp' ]]
244 elif [[ $1 = '-assembly' ]]
247 elif [[ $1 = '-abortreaders' ]]
250 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
251 JAVAOPTS="$JAVAOPTS -abortreaders"
252 elif [[ $1 = '-sandbox' ]]
255 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
256 JAVAOPTS="$JAVAOPTS -sandbox"
257 elif [[ $1 = '-numa' ]]
259 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
261 elif [[ $1 = '-robustroot' ]]
265 elif [[ $1 = '-builddir' ]]
267 tmpbuilddirectory="$2"
269 elif [[ $1 = '-nojava' ]]
272 elif [[ $1 = '-eventmonitor' ]]
274 JAVAOPTS="$JAVAOPTS -eventmonitor"
276 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
277 elif [[ $1 = '-garbagestats' ]]
279 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
280 elif [[ $1 = '-64bit' ]]
282 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
283 elif [[ $1 = '-32bit' ]]
285 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
286 elif [[ $1 = '-fastcheck' ]]
288 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
289 JAVAOPTS="$JAVAOPTS -fastcheck"
295 elif [[ $1 = '-mainclass' ]]
297 JAVAOPTS="$JAVAOPTS -mainclass $2"
299 elif [[ $1 = '-selfloop' ]]
301 JAVAOPTS="$JAVAOPTS -selfloop $2"
303 elif [[ $1 = '-excprefetch' ]]
305 JAVAOPTS="$JAVAOPTS -excprefetch $2"
307 elif [[ $1 = '-arraypad' ]]
309 JAVAOPTS="$JAVAOPTS -arraypad"
310 elif [[ $1 = '-dsm' ]]
312 JAVAOPTS="$JAVAOPTS -dsm"
314 elif [[ $1 = '-fastmemcpy' ]]
317 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
318 elif [[ $1 = '-singleTM' ]]
320 JAVAOPTS="$JAVAOPTS -singleTM"
321 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
323 elif [[ $1 = '-stmarray' ]]
325 JAVAOPTS="$JAVAOPTS -stmarray"
326 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
328 elif [[ $1 = '-dualview' ]]
330 JAVAOPTS="$JAVAOPTS -dualview"
331 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
333 elif [[ $1 = '-readset' ]]
335 JAVAOPTS="$JAVAOPTS -readset"
336 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
337 elif [[ $1 = '-stmdebug' ]]
339 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
340 elif [[ $1 = '-stmstats' ]]
342 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
343 elif [[ $1 = '-stmlog' ]]
345 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
346 elif [[ $1 = '-prefetch' ]]
348 JAVAOPTS="$JAVAOPTS -prefetch"
349 elif [[ $1 = '-transstats' ]]
351 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
352 elif [[ $1 = '-printflat' ]]
354 JAVAOPTS="$JAVAOPTS -printflat"
355 elif [[ $1 = '-trueprob' ]]
357 JAVAOPTS="$JAVAOPTS -trueprob $2"
359 elif [[ $1 = '-inlineatomic' ]]
361 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
363 elif [[ $1 = '-mac' ]]
365 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
366 elif [[ $1 = '-profile' ]]
369 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
370 elif [[ $1 = '-gcprofile' ]]
373 elif [[ $1 = '-gcprofile_s' ]]
376 elif [[ $1 = '-accurateprofile' ]]
378 ACCURATEPROFILEFLAG=true
379 elif [[ $1 = '-profile_interrupt' ]]
381 PROFILEINTERRUPTFLAG=true
382 elif [[ $1 = '-useio' ]]
385 elif [[ $1 = '-taskstate' ]]
387 JAVAOPTS="$JAVAOPTS -taskstate"
388 elif [[ $1 = '-tagstate' ]]
390 JAVAOPTS="$JAVAOPTS -tagstate"
391 elif [[ $1 = '-scheduling' ]]
393 JAVAOPTS="$JAVAOPTS -scheduling"
394 elif [[ $1 = '-multicore' ]]
397 JAVAOPTS="$JAVAOPTS -multicore"
398 elif [[ $1 = '-numcore' ]]
400 JAVAOPTS="$JAVAOPTS -numcore $2"
401 if [[ "$2" -gt "1" ]]
403 TILERAN1COREFLAG=true
404 if [[ "$2" -eq "56" ]]
406 TILERA56COREFLAG=true
410 elif [[ $1 = '-numcore4gc' ]]
412 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
415 elif [[ $1 = '-raw' ]]
418 JAVAOPTS="$JAVAOPTS -raw"
419 elif [[ $1 = '-tilera_bme' ]]
423 elif [[ $1 = '-tilera_zlinux' ]]
426 TILERAZLINUXFLAG=true
427 elif [[ $1 = '-tilera_memprof' ]]
429 TILERAMEMPROFFLAG=true
430 elif [[ $1 = '-tileraconfig' ]]
434 elif [[ $1 = '-cacheflush' ]]
437 elif [[ $1 = '-rawconfig' ]]
441 elif [[ $1 = '-interrupt' ]]
444 elif [[ $1 = '-abcclose' ]]
446 JAVAOPTS="$JAVAOPTS -abcclose"
447 elif [[ $1 = '-optional' ]]
449 JAVAOPTS="$JAVAOPTS -optional"
451 elif [[ $1 = '-multicoregc' ]]
454 JAVAOPTS="$JAVAOPTS -multicoregc"
455 elif [[ $1 = '-gcmem_local' ]]
458 elif [[ $1 = '-gcmem_fixed' ]]
461 elif [[ $1 = '-gcmem_mixed' ]]
464 elif [[ $1 = '-gcmem_global' ]]
467 elif [[ $1 = '-gccache_local' ]]
469 GCCACHELOCALFLAG=true
470 elif [[ $1 = '-gccache_ran' ]]
473 elif [[ $1 = '-gccontroller_near' ]]
475 GCCONTROLLERNEARFLAG=true
476 elif [[ $1 = '-gccontroller_remote' ]]
478 GCCONTROLLERREMOTEFLAG=true
479 elif [[ $1 = '-gcsmallpagesize' ]]
481 GCSMALLPAGESIZEFLAG=true
482 elif [[ $1 = '-gcsmallpagesize2' ]]
484 GCSMALLPAGESIZEFLAG2=true
485 elif [[ $1 = '-gclargepagesize' ]]
487 GCLARGEPAGESIZEFLAG=true
488 elif [[ $1 = '-gclargepagesize2' ]]
490 GCLARGEPAGESIZE2FLAG=true
491 elif [[ $1 = '-gclargesharedheap' ]]
493 GCLARGESHAREDHEAPFLAG=true
494 elif [[ $1 = '-gclargesharedheap2' ]]
496 GCLARGESHAREDHEAPFLAG2=true
497 elif [[ $1 = '-gccacheadapt' ]]
499 GCCACHEADAPTFLAG=true
500 elif [[ $1 = '-gccacheadaptpolicy' ]]
502 GCCACHEADAPTPOLICYFLAG=true
503 GCCACHEADAPTPOLICY="$2"
505 elif [[ $1 = '-gccachesampling' ]]
507 GCCACHESAMPLINGFLAG=true
508 elif [[ $1 = '-mgc' ]]
511 JAVAOPTS="$JAVAOPTS -mgc"
512 elif [[ $1 = '-dmalloc' ]]
515 elif [[ $1 = '-recover' ]]
518 JAVAOPTS="$JAVAOPTS -task"
519 elif [[ $1 = '-useprofile' ]]
521 JAVAOPTS="$JAVAOPTS -useprofile $2"
523 elif [[ $1 = '-webinterface' ]]
525 JAVAOPTS="$JAVAOPTS -webinterface"
526 elif [[ $1 = '-instructionfailures' ]]
528 JAVAOPTS="$JAVAOPTS -instructionfailures"
529 elif [[ $1 = '-joptimize' ]]
531 JAVAOPTS="$JAVAOPTS -optimize"
532 elif [[ $1 = '-noloop' ]]
534 JAVAOPTS="$JAVAOPTS -noloop"
535 elif [[ $1 = '-dcopts' ]]
537 JAVAOPTS="$JAVAOPTS -dcopts"
538 elif [[ $1 = '-delaycomp' ]]
540 JAVAOPTS="$JAVAOPTS -delaycomp"
541 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
542 elif [[ $1 = '-hybrid' ]]
544 JAVAOPTS="$JAVAOPTS -hybrid"
545 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
546 elif [[ $1 = '-minimize' ]]
548 JAVAOPTS="$JAVAOPTS -minimize"
550 elif [[ $1 = '-ooojava' ]]
553 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
554 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
558 elif [[ $1 = '-ooodebug-disable-task-mem-pool' ]]
560 EXTRAOPTIONS="$EXTRAOPTIONS -DOOO_DISABLE_TASKMEMPOOL"
562 elif [[ $1 = '-heapsize-mb' ]]
564 EXTRAOPTIONS="$EXTRAOPTIONS -DINITIALHEAPSIZE_MB=($2)"
567 elif [[ $1 = '-rcr' ]]
569 JAVAOPTS="$JAVAOPTS -rcr"
571 EXTRAOPTIONS="$EXTRAOPTIONS -DRCR -I$ROBUSTROOT/Runtime/oooJava"
574 elif [[ $1 = '-coreprof' ]]
577 JAVAOPTS="$JAVAOPTS -coreprof"
578 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
580 elif [[ $1 = '-coreprof-eventwords' ]]
582 EXTRAOPTIONS="$EXTRAOPTIONS -DCP_MAXEVENTWORDS=($2)"
585 elif [[ $1 = '-coreprof-checkoverflow' ]]
587 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF_CHECKOVERFLOW"
589 elif [[ $1 = '-coreprof-enable' ]]
591 EXTRAOPTIONS="$EXTRAOPTIONS -D$2"
594 elif [[ $1 = '-mlp' ]]
597 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
598 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
602 elif [[ $1 = '-mlpdebug' ]]
604 JAVAOPTS="$JAVAOPTS -mlpdebug"
606 elif [[ $1 = '-check' ]]
609 JAVAOPTS="$JAVAOPTS -conscheck"
610 elif [[ $1 = '-enable-assertions' ]]
612 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
613 elif [[ $1 = '-specdir' ]]
619 elif [[ $1 = '-debug' ]]
622 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
623 elif [[ $1 = '-rawpath' ]]
626 elif [[ $1 = '-runtimedebug' ]]
628 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
629 elif [[ $1 = '-dsmcaching' ]]
631 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
632 elif [[ $1 = '-rangeprefetch' ]]
634 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
635 elif [[ $1 = '-nooptimize' ]]
637 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
638 elif [[ $1 = '-optimize' ]]
640 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
641 elif [[ $1 = '-thread' ]]
643 JAVAOPTS="$JAVAOPTS -thread"
644 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
646 elif [[ $1 = '-recovery' ]]
648 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
650 elif [[ $1 = '-recoverystats' ]]
652 JAVAOPTS="$JAVAOPTS -recoverystats"
653 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
654 elif [[ $1 = '-distributioninfo' ]]
656 JAVAOPTS="$JAVAOPTS -distributioninfo"
657 elif [[ $1 = '-disall' ]]
659 JAVAOPTS="$JAVAOPTS -disall"
660 elif [[ $1 = '-disstart' ]]
662 JAVAOPTS="$JAVAOPTS -disstart $2"
664 elif [[ $1 = '-noc' ]]
667 elif [[ $1 = '-curdir' ]]
671 elif [[ $1 = '-outputdir' ]]
673 JAVAOPTS="$JAVAOPTS -outputdir $2"
676 SRCFILES="$SRCFILES $1"
681 BUILDDIR="$CURDIR/$tmpbuilddirectory"
683 BAMBOORUNTIME=$ROBUSTROOT/Runtime/bamboo
691 if $CHECKFLAG #Generate structure files for repair tool
693 JAVAOPTS="$JAVAOPTS -struct structfile"
703 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
705 #base bristlecone files
706 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
712 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
715 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
718 #threading java stuff
719 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
722 #base multicore gc files
723 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/MGC"
726 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
729 # Build bristlecone/java sources
733 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
734 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
735 -dir $BUILDDIR $JAVAOPTS $SRCFILES
739 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
742 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
743 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
750 if $EXITAFTERANALYSIS
755 # Build all of the consistency specs
757 if $CHECKFLAG # CHECKFLAG
760 mkdir $BUILDDIR/specdir
761 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
763 echo > $BUILDDIR/specs
765 # compile specs into C code
766 for i in * # iterate over all directories
768 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
771 cat $BUILDDIR/structfile.struct $i.label > $i.struct
772 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
773 cp size.[c,h] $BUILDDIR/specdir
774 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
775 echo $i >> $BUILDDIR/specs
777 done # iterate over all directories
783 echo > $BUILDDIR/checkers.h
784 for i in `cat $BUILDDIR/specs`
786 gcc -O0 -g -fbounds-check -c $i\_aux.c
787 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
791 #build and link everything
796 MAKEFILE="Makefile.raw"
802 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
806 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
811 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
816 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
820 then # profile version
821 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
824 if $ACCURATEPROFILEFLAG
825 then # accurateprofile version
826 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
831 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
835 then #INTERRUPT version
836 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
837 fi #INTERRUPT version
841 MAKEFILE="$MAKEFILE.io"
842 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
844 MAKEFILE="$MAKEFILE.$RAWCONFIG"
847 cp $BAMBOORUNTIME/RAW/$MAKEFILE ./Makefile
853 cp ../Runtime/coreprof/*.c ./coreprof/
854 cp ../Runtime/coreprof/*.h ./coreprof/
855 cp $BAMBOORUNTIME/*.c ./
856 cp $BAMBOORUNTIME/*.h ./
857 cp $BAMBOORUNTIME/RAW/*.c ./
858 cp $BAMBOORUNTIME/RAW/*.h ./
859 cp $BAMBOORUNTIME/RAW/*.S ./
860 cp $BAMBOORUNTIME/RAW/*.s ./
861 cp ../$tmpbuilddirectory/*.c ./
862 cp ../$tmpbuilddirectory/*.h ./
868 TILERADIR="$CURDIR/tilera"
872 MAKEFILE="Makefile.tilera.$TILERACONFIG"
873 SIMHVC="sim.hvc.$TILERACONFIG"
874 PCIHVC="pci.hvc.$TILERACONFIG"
879 elif $TILERAZLINUXFLAG
880 then # TILERAZLINUXFLAG
881 TILERA_INDIR="ZLinux"
882 MAKEFILE="Makefile.tilera.$TILERACONFIG"
892 export TILERACFLAGS="-DMULTICORE -DCLOSE_PRINT -DTILERA"
894 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
897 if $TILERAMEMPROFFLAG
898 then # not only with 1 core
899 PCIHVC="$PCIHVC.memprof"
900 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
905 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
906 elif $TILERAZLINUXFLAG
907 then # TILERAZLINUXFLAG
908 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
913 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
918 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
923 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
927 then # profile version
928 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
931 if $ACCURATEPROFILEFLAG
932 then # accurateprofile version
933 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
936 if $PROFILEINTERRUPTFLAG
937 then # profile_interrupt version
938 TILERACFLAGS="${TILERACFLAGS} -DPROFILE_INTERRUPT"
943 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
947 then #INTERRUPT version
948 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
949 fi #INTERRUPT version
953 TILERACFLAGS="${TILERACFLAGS} -DMGC"
957 then #MULTICOREGC version
958 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
962 then # GC_PROFILE version
963 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
967 then # GC_PROFILE_S version
968 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
972 then # SMEMLOCAL version
973 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
977 then # SMEMFIXED version
978 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
982 then # SMEMMIXED version
983 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
987 then # SMEMGLOBAL version
988 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
992 then # CACHE_LOCAL version
993 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
997 then # CACHE_RAN version
998 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
1001 if $GCCONTROLLERNEARFLAG
1002 then # CONTROLLER_NEAR version
1003 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
1006 if $GCCONTROLLERREMOTEFLAG
1007 then # CONTROLLER_REMOTE version
1008 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
1011 if $GCSMALLPAGESIZEFLAG
1012 then # GC_SMALLPAGESIZE version
1013 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
1016 if $GCLARGEPAGESIZEFLAG
1017 then # GC_LARGEPAGESIZE version
1018 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
1021 if $GCLARGEPAGESIZE2FLAG
1022 then # GC_LARGEPAGESIZE2 version
1023 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE2"
1026 if $GCLARGESHAREDHEAPFLAG
1027 then # GC_LARGESHAREDHEAP version
1028 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
1031 if $GCSMALLPAGESIZEFLAG2
1032 then # GC_SMALLPAGESIZE2 version
1033 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
1036 if $GCLARGESHAREDHEAPFLAG2
1037 then # GC_LARGESHAREDHEAP2 version
1038 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
1041 if $GCCACHEADAPTFLAG
1042 then # GC_CACHE_ADAPT version
1043 TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_ADAPT"
1046 if $GCCACHEADAPTPOLICYFLAG
1047 then # GC_CACHE_ADAPT version
1048 TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_ADAPT_POLICY${GCCACHEADAPTPOLICY}"
1051 if $GCCACHESAMPLINGFLAG
1052 then # GC_CACHE_ADAPT version
1053 TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_SAMPLING"
1058 cp $ROBUSTROOT/Tilera/Runtime/MGC/$MAKEFILE ./Makefile
1060 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
1063 then # TILERABMEFLAG
1064 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
1065 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
1066 if $TILERA56COREFLAG
1068 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc.56 ./bamboo-vmlinux-pci.hvc.56
1070 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
1073 cp ../Runtime/Queue.c ./
1074 cp ../Runtime/file.c ./
1075 cp ../Runtime/math.c ./
1078 cp ../Runtime/object.c ./
1080 cp ../Runtime/GenericHashtable.c ./
1081 cp ../Runtime/SimpleHash.c ./
1082 cp ../Runtime/ObjectHash.c ./
1083 cp ../Runtime/socket.c ./
1084 cp ../Runtime/mem.c ./
1085 cp ../Runtime/GenericHashtable.h ./
1086 cp ../Runtime/mem.h ./
1089 cp ../Runtime/object.h ./
1091 cp ../Runtime/ObjectHash.h ./
1092 cp ../Runtime/Queue.h ./
1093 cp ../Runtime/runtime.h ./
1094 cp ../Runtime/SimpleHash.h ./
1096 cp ../Runtime/coreprof/coreprof.c ./coreprof/
1097 cp ../Runtime/coreprof/coreprof.h ./coreprof/
1098 cp $BAMBOORUNTIME/multicoretask.c ./
1099 cp $BAMBOORUNTIME/multicoreruntime.c ./
1100 cp $BAMBOORUNTIME/multicoremem.c ./
1101 cp $BAMBOORUNTIME/multicoregarbage.c ./
1102 cp $BAMBOORUNTIME/GCSharedHash.c ./
1103 cp $BAMBOORUNTIME/MGCHash.c ./
1104 cp $BAMBOORUNTIME/multicoreruntime.h ./
1105 cp $BAMBOORUNTIME/multicoremem.h ./
1106 cp $BAMBOORUNTIME/multicoregarbage.h ./
1107 cp $BAMBOORUNTIME/multicorecache.h ./
1108 cp $BAMBOORUNTIME/multicoregc.h ./
1109 cp $BAMBOORUNTIME/multicorehelper.h ./
1110 cp $BAMBOORUNTIME/GCSharedHash.h ./
1111 cp $BAMBOORUNTIME/MGCHash.h ./
1112 cp ../Tilera/Runtime/*.c ./
1113 cp ../Tilera/Runtime/*.h ./
1114 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
1115 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
1116 if $TILERAZLINUXFLAG
1117 then # TILERAZLINUXFLAG
1118 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
1120 #if $TILERAMEMPROFFLAG
1121 #then # TILERAMEMPROFFLAG
1122 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
1126 cp ../Tilera/Runtime/MGC/*.c ./
1127 cp ../Tilera/Runtime/MGC/*.h ./
1129 cp ../Tilera/lib/* ./
1130 cp ../$tmpbuilddirectory/*.c ./
1131 cp ../$tmpbuilddirectory/*.h ./
1135 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
1138 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
1143 RUNTIMEFILE="$BAMBOORUNTIME/multicoreruntime.c $BAMBOORUNTIME/multicoretask.c"
1144 INCLUDES="$INCLUDES -I$BAMBOORUNTIME"
1146 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
1149 FILES="$RUNTIMEFILE \
1150 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1151 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1152 $ROBUSTROOT/Runtime/ObjectHash.c \
1153 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1154 $ROBUSTROOT/Runtime/math.c \
1155 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1159 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1164 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1169 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1176 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1177 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"
1179 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1180 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"
1186 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1187 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1194 FILES="$FILES $DSMRUNTIME/sandbox.c"
1196 FILES="$FILES $STMRUNTIME/sandbox.c"
1202 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1207 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1212 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1217 FILES="$FILES $tmpbuilddirectory/RuntimeConflictResolver.c $ROBUSTROOT/Runtime/oooJava/hashRCR.c $ROBUSTROOT/Runtime/oooJava/Queue_RCR.c $ROBUSTROOT/Runtime/oooJava/hashStructure.c $ROBUSTROOT/Runtime/oooJava/WaitingQueue.c $ROBUSTROOT/Runtime/oooJava/trqueue.c $ROBUSTROOT/Runtime/oooJava/rcr_runtime.c"
1222 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1223 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1224 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1229 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1232 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1234 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1237 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1239 if $THREADSIMULATEFLAG
1241 # -lpthread for pthread functions, -lrt for message queue functions
1242 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1248 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1249 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1254 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1259 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1260 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1265 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1269 echo EXTRAOPTIONS=$EXTRAOPTIONS
1273 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1274 -c $tmpbuilddirectory/methods.c -lm
1281 NONMULTICOREOPTS=-DPRECISE_GC
1286 gcc -E $INCLUDES $EXTRAOPTIONS $NONMULTICOREOPTS \
1287 $tmpbuilddirectory/methods.c $FILES > tmp.c
1290 gcc $INCLUDES $EXTRAOPTIONS $NONMULTICOREOPTS \
1291 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin