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 "-ooojava <numberofcores> <maxseseage>"
24 echo -ooodebug general OOOJava debugging messages
25 echo -rcr turn on runtime conflict resolver
27 echo Disjoint Reachability Analysis options
28 echo -disjoint enable analysis
29 echo -disjoint-k set k-limit for heap nodes per allocation site
30 echo "-disjoint-write-dots <all/final> write reach graphs for all method sols. or only final sols."
31 echo -disjoint-write-initial-contexts write reach graphs for callee initial contexts from all call sites
32 echo -disjoint-write-ihms write reach graphs for each call site\'s Initial Heap Model
33 echo "-disjoint-alias-file <filename> <normal/tabbed> write sharing for normal human reading or LaTeX tabbed"
34 echo "-disjoint-debug-callsite <callee> <caller> <visit to start> <num caps> <T/F stop after>"
35 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"
36 echo "-disjoint-debug-snap-method <method> <visit to start> <num caps> <T/F stop after>"
37 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"
38 echo "-disjoint-dvisit-stack use stack strat to visit descriptors (tasks or methods)"
39 echo -disjoint-dvisit-stack-callees-on-top alternate stack strat
40 echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors
41 echo -disjoint-desire-determinism set above interproc for determinism
42 echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
44 echo "-mlp <num cores> <max sese age> build mlp code"
45 echo -mlpdebug if mlp, report progress and interim results
48 echo -dsm distributed shared memory
49 echo -abortreaders abort readers immediately
50 echo -trueprob double - probabiltiy of true branch
51 echo -dsmcaching -enable caching in dsm runtime
53 echo BAMBOO Multicore options
54 echo -scheduling do task scheduling
55 echo -multicore generate multi-core version binary
56 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
57 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
58 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
59 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
60 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
61 echo -printscheduling print out scheduling graphs
62 echo -printschedulesim print out scheduling simulator result graphs
63 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
64 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
65 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
66 echo "-raw generate raw version binary (should be used together with -multicore)"
67 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
68 echo -multicoregc generate multi-core binary with garbage collection
69 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
70 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
71 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
72 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
73 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
74 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
75 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
76 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
77 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
78 echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)"
79 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
80 echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)"
81 echo "-gccacheadapt setup as cacheadaptable mode (should be used together with -multicoregc)"
82 echo -gcprofile build with gcprofile options
83 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
84 echo -accurateprofile build with accurate profile information including pre/post task processing info
85 echo -profile_interrupt build with profile information of interrupts
86 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
89 echo -abcclose turnoff array boundary checks
90 echo -builddir setup different build directory
91 echo -robustroot set up the ROBUSTROOT to directory other than default one
92 echo -readset turn on readset
93 echo -mac distributed shared memory mac support
94 echo -check generate check code
95 echo -dmalloc link in dmalloc
96 echo -64bit compile for 64 bit machine
97 echo -32bit compile for 32 bit machine
98 echo -joptimize java compiler optimizations
99 echo -noloop turnoff loop optimizations
100 echo -recover compile task code
101 echo -fastcheck fast checkpointing for Bristlecone
102 echo -specdir directory
103 echo -printflat print out flat representation
104 echo -selfloop task - this task cannot self loop forever
105 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
106 echo -taskstate do task state analysis
107 echo -tagstate do tag state analysis
108 echo -optional enable optional
109 echo -debug generate debug symbols
110 echo -prefetch do prefetch analysis
111 echo -heapsize-mb NUM set initial heap size in MB, default is 256
112 echo -garbagestats Print garbage collection statistics
113 echo -webinterface enable web interface
114 echo -runtimedebug printout runtime debug messages
115 echo "-thread use support for multiple threads"
116 echo "-optimize call gcc with -O9 (optimize)"
117 echo "-nooptimize call gcc with -O0 (do not optimize)"
118 echo -curdir directory
119 echo -mainclass class with main method
121 echo -nojava do not run bristlecone compiler
122 echo -instructionfailures inject code for instructionfailures
123 echo -profile build with profile options
124 echo "-enable-assertions execute assert statements during compilation"
125 echo -justanalyze exit after compiler analyses complete
126 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
127 echo "-disall execute to collect whole distribution"
128 echo "-disstart specify the start number of distribution information collection"
129 echo -assembly generate assembly
130 echo -recovery compile recovery code
131 echo -dsmtask support work and task class library
132 echo -recoverystats print out recovery record
136 tmpbuilddirectory="tmpbuilddirectory"
141 ROBUSTROOT=~/research/Robust/src
142 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
143 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
144 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
145 REPAIRROOT=~/research/Repair/RepairCompiler/
164 TILERAZLINUXFLAG=false
165 TILERAMEMPROFFLAG=false
174 ACCURATEPROFILEFLAG=false
175 PROFILEINTERRUPTFLAG=false
178 THREADSIMULATEFLAG=false;
179 MULTICOREGCFLAG=false;
180 GCMEMLOCALFLAG=false;
181 GCMEMFIXEDFLAG=false;
182 GCMEMMIXEDFLAG=false;
183 GCMEMGLOBALFLAG=false;
184 GCCACHELOCALFLAG=false;
185 GCCACHERANFLAG=false;
186 GCCONTROLLERNEARFLAG=false;
187 GCCONTROLLERREMOTEFLAG=false;
188 GCSMALLPAGESIZEFLAG=false;
189 GCLARGEPAGESIZEFLAG=false;
190 GCLARGESHAREDHEAPFLAG=false;
191 GCSMALLPAGESIZEFLAG2=false;
192 GCLARGESHAREDHEAPFLAG2=false;
193 GCCACHEADAPTFLAG=false
204 EXITAFTERANALYSIS=false
207 TILERAN1COREFLAG=false
208 TILERA56COREFLAG=false
218 if [[ $1 = '-help' ]]
222 elif [[ $1 = '-justanalyze' ]]
224 EXITAFTERANALYSIS=true
225 elif [[ $1 = '-assembly' ]]
228 elif [[ $1 = '-abortreaders' ]]
231 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
232 JAVAOPTS="$JAVAOPTS -abortreaders"
233 elif [[ $1 = '-sandbox' ]]
236 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
237 JAVAOPTS="$JAVAOPTS -sandbox"
238 elif [[ $1 = '-numa' ]]
240 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
242 elif [[ $1 = '-robustroot' ]]
246 elif [[ $1 = '-builddir' ]]
248 tmpbuilddirectory="$2"
250 elif [[ $1 = '-nojava' ]]
253 elif [[ $1 = '-eventmonitor' ]]
255 JAVAOPTS="$JAVAOPTS -eventmonitor"
257 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
258 elif [[ $1 = '-garbagestats' ]]
260 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
261 elif [[ $1 = '-64bit' ]]
263 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
264 elif [[ $1 = '-32bit' ]]
266 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
267 elif [[ $1 = '-fastcheck' ]]
269 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
270 JAVAOPTS="$JAVAOPTS -fastcheck"
276 elif [[ $1 = '-mainclass' ]]
278 JAVAOPTS="$JAVAOPTS -mainclass $2"
280 elif [[ $1 = '-selfloop' ]]
282 JAVAOPTS="$JAVAOPTS -selfloop $2"
284 elif [[ $1 = '-excprefetch' ]]
286 JAVAOPTS="$JAVAOPTS -excprefetch $2"
288 elif [[ $1 = '-arraypad' ]]
290 JAVAOPTS="$JAVAOPTS -arraypad"
291 elif [[ $1 = '-dsm' ]]
293 JAVAOPTS="$JAVAOPTS -dsm"
295 elif [[ $1 = '-fastmemcpy' ]]
298 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
299 elif [[ $1 = '-singleTM' ]]
301 JAVAOPTS="$JAVAOPTS -singleTM"
302 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
304 elif [[ $1 = '-stmarray' ]]
306 JAVAOPTS="$JAVAOPTS -stmarray"
307 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
309 elif [[ $1 = '-dualview' ]]
311 JAVAOPTS="$JAVAOPTS -dualview"
312 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
314 elif [[ $1 = '-readset' ]]
316 JAVAOPTS="$JAVAOPTS -readset"
317 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
318 elif [[ $1 = '-stmdebug' ]]
320 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
321 elif [[ $1 = '-stmstats' ]]
323 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
324 elif [[ $1 = '-stmlog' ]]
326 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
327 elif [[ $1 = '-prefetch' ]]
329 JAVAOPTS="$JAVAOPTS -prefetch"
330 elif [[ $1 = '-transstats' ]]
332 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
333 elif [[ $1 = '-printflat' ]]
335 JAVAOPTS="$JAVAOPTS -printflat"
336 elif [[ $1 = '-trueprob' ]]
338 JAVAOPTS="$JAVAOPTS -trueprob $2"
340 elif [[ $1 = '-inlineatomic' ]]
342 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
344 elif [[ $1 = '-mac' ]]
346 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
347 elif [[ $1 = '-profile' ]]
350 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
351 elif [[ $1 = '-gcprofile' ]]
354 elif [[ $1 = '-gcprofile_s' ]]
357 elif [[ $1 = '-accurateprofile' ]]
359 ACCURATEPROFILEFLAG=true
360 elif [[ $1 = '-profile_interrupt' ]]
362 PROFILEINTERRUPTFLAG=true
363 elif [[ $1 = '-useio' ]]
366 elif [[ $1 = '-taskstate' ]]
368 JAVAOPTS="$JAVAOPTS -taskstate"
369 elif [[ $1 = '-tagstate' ]]
371 JAVAOPTS="$JAVAOPTS -tagstate"
372 elif [[ $1 = '-scheduling' ]]
374 JAVAOPTS="$JAVAOPTS -scheduling"
375 elif [[ $1 = '-multicore' ]]
378 JAVAOPTS="$JAVAOPTS -multicore"
379 elif [[ $1 = '-numcore' ]]
381 JAVAOPTS="$JAVAOPTS -numcore $2"
382 if [[ "$2" -gt "1" ]]
384 TILERAN1COREFLAG=true
385 if [[ "$2" -eq "56" ]]
387 TILERA56COREFLAG=true
391 elif [[ $1 = '-numcore4gc' ]]
393 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
396 elif [[ $1 = '-raw' ]]
399 JAVAOPTS="$JAVAOPTS -raw"
400 elif [[ $1 = '-tilera_bme' ]]
404 elif [[ $1 = '-tilera_zlinux' ]]
407 TILERAZLINUXFLAG=true
408 elif [[ $1 = '-tilera_memprof' ]]
410 TILERAMEMPROFFLAG=true
411 elif [[ $1 = '-tileraconfig' ]]
415 elif [[ $1 = '-cacheflush' ]]
418 elif [[ $1 = '-rawconfig' ]]
422 elif [[ $1 = '-interrupt' ]]
425 elif [[ $1 = '-abcclose' ]]
427 JAVAOPTS="$JAVAOPTS -abcclose"
428 elif [[ $1 = '-optional' ]]
430 JAVAOPTS="$JAVAOPTS -optional"
432 elif [[ $1 = '-multicoregc' ]]
435 JAVAOPTS="$JAVAOPTS -multicoregc"
436 elif [[ $1 = '-gcmem_local' ]]
439 elif [[ $1 = '-gcmem_fixed' ]]
442 elif [[ $1 = '-gcmem_mixed' ]]
445 elif [[ $1 = '-gcmem_global' ]]
448 elif [[ $1 = '-gccache_local' ]]
450 GCCACHELOCALFLAG=true
451 elif [[ $1 = '-gccache_ran' ]]
454 elif [[ $1 = '-gccontroller_near' ]]
456 GCCONTROLLERNEARFLAG=true
457 elif [[ $1 = '-gccontroller_remote' ]]
459 GCCONTROLLERREMOTEFLAG=true
460 elif [[ $1 = '-gcsmallpagesize' ]]
462 GCSMALLPAGESIZEFLAG=true
463 elif [[ $1 = '-gcsmallpagesize2' ]]
465 GCSMALLPAGESIZEFLAG2=true
466 elif [[ $1 = '-gclargepagesize' ]]
468 GCLARGEPAGESIZEFLAG=true
469 elif [[ $1 = '-gclargesharedheap' ]]
471 GCLARGESHAREDHEAPFLAG=true
472 elif [[ $1 = '-gclargesharedheap2' ]]
474 GCLARGESHAREDHEAPFLAG2=true
475 elif [[ $1 = '-gccacheadapt' ]]
477 GCCACHEADAPTFLAG=true
478 elif [[ $1 = '-dmalloc' ]]
481 elif [[ $1 = '-recover' ]]
484 JAVAOPTS="$JAVAOPTS -task"
485 elif [[ $1 = '-useprofile' ]]
487 JAVAOPTS="$JAVAOPTS -useprofile $2"
489 elif [[ $1 = '-webinterface' ]]
491 JAVAOPTS="$JAVAOPTS -webinterface"
492 elif [[ $1 = '-instructionfailures' ]]
494 JAVAOPTS="$JAVAOPTS -instructionfailures"
495 elif [[ $1 = '-joptimize' ]]
497 JAVAOPTS="$JAVAOPTS -optimize"
498 elif [[ $1 = '-noloop' ]]
500 JAVAOPTS="$JAVAOPTS -noloop"
501 elif [[ $1 = '-dcopts' ]]
503 JAVAOPTS="$JAVAOPTS -dcopts"
504 elif [[ $1 = '-delaycomp' ]]
506 JAVAOPTS="$JAVAOPTS -delaycomp"
507 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
508 elif [[ $1 = '-hybrid' ]]
510 JAVAOPTS="$JAVAOPTS -hybrid"
511 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
512 elif [[ $1 = '-minimize' ]]
514 JAVAOPTS="$JAVAOPTS -minimize"
516 elif [[ $1 = '-ooojava' ]]
519 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
520 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
524 elif [[ $1 = '-heapsize-mb' ]]
526 EXTRAOPTIONS="$EXTRAOPTIONS -DINITIALHEAPSIZE_MB=($2)"
529 elif [[ $1 = '-rcr' ]]
531 JAVAOPTS="$JAVAOPTS -rcr"
533 EXTRAOPTIONS="$EXTRAOPTIONS -I$ROBUSTROOT/Runtime/oooJava"
536 elif [[ $1 = '-coreprof' ]]
539 JAVAOPTS="$JAVAOPTS -coreprof"
540 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
542 elif [[ $1 = '-coreprof-eventwords' ]]
544 EXTRAOPTIONS="$EXTRAOPTIONS -DCP_MAXEVENTWORDS=($2)"
547 elif [[ $1 = '-coreprof-checkoverflow' ]]
549 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF_CHECKOVERFLOW"
551 elif [[ $1 = '-mlp' ]]
554 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
555 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
559 elif [[ $1 = '-mlpdebug' ]]
561 JAVAOPTS="$JAVAOPTS -mlpdebug"
563 elif [[ $1 = '-check' ]]
566 JAVAOPTS="$JAVAOPTS -conscheck"
567 elif [[ $1 = '-enable-assertions' ]]
569 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
570 elif [[ $1 = '-specdir' ]]
576 elif [[ $1 = '-debug' ]]
579 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
580 elif [[ $1 = '-rawpath' ]]
583 elif [[ $1 = '-runtimedebug' ]]
585 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
586 elif [[ $1 = '-dsmcaching' ]]
588 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
589 elif [[ $1 = '-rangeprefetch' ]]
591 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
592 elif [[ $1 = '-nooptimize' ]]
594 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
595 elif [[ $1 = '-optimize' ]]
597 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
598 elif [[ $1 = '-thread' ]]
600 JAVAOPTS="$JAVAOPTS -thread"
601 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
603 elif [[ $1 = '-recovery' ]]
605 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
607 elif [[ $1 = '-recoverystats' ]]
609 JAVAOPTS="$JAVAOPTS -recoverystats"
610 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
611 elif [[ $1 = '-distributioninfo' ]]
613 JAVAOPTS="$JAVAOPTS -distributioninfo"
614 elif [[ $1 = '-disall' ]]
616 JAVAOPTS="$JAVAOPTS -disall"
617 elif [[ $1 = '-disstart' ]]
619 JAVAOPTS="$JAVAOPTS -disstart $2"
621 elif [[ $1 = '-noc' ]]
624 elif [[ $1 = '-curdir' ]]
628 elif [[ $1 = '-outputdir' ]]
630 JAVAOPTS="$JAVAOPTS -outputdir $2"
633 SRCFILES="$SRCFILES $1"
638 BUILDDIR="$CURDIR/$tmpbuilddirectory"
640 BAMBOORUNTIME=$ROBUSTROOT/Runtime/bamboo
648 if $CHECKFLAG #Generate structure files for repair tool
650 JAVAOPTS="$JAVAOPTS -struct structfile"
660 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
662 #base bristlecone files
663 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
669 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
672 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
675 #threading java stuff
676 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
679 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
682 # Build bristlecone/java sources
686 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
687 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
688 -dir $BUILDDIR $JAVAOPTS $SRCFILES
692 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
695 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
696 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
703 if $EXITAFTERANALYSIS
708 # Build all of the consistency specs
710 if $CHECKFLAG # CHECKFLAG
713 mkdir $BUILDDIR/specdir
714 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
716 echo > $BUILDDIR/specs
718 # compile specs into C code
719 for i in * # iterate over all directories
721 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
724 cat $BUILDDIR/structfile.struct $i.label > $i.struct
725 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
726 cp size.[c,h] $BUILDDIR/specdir
727 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
728 echo $i >> $BUILDDIR/specs
730 done # iterate over all directories
736 echo > $BUILDDIR/checkers.h
737 for i in `cat $BUILDDIR/specs`
739 gcc -O0 -g -fbounds-check -c $i\_aux.c
740 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
744 #build and link everything
749 MAKEFILE="Makefile.raw"
755 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
759 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
764 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
769 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
773 then # profile version
774 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
777 if $ACCURATEPROFILEFLAG
778 then # accurateprofile version
779 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
784 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
788 then #INTERRUPT version
789 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
790 fi #INTERRUPT version
794 MAKEFILE="$MAKEFILE.io"
795 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
797 MAKEFILE="$MAKEFILE.$RAWCONFIG"
800 cp $BAMBOORUNTIME/RAW/$MAKEFILE ./Makefile
805 cp $BAMBOORUNTIME/RAW/*.c ./
806 cp $BAMBOORUNTIME/RAW/*.h ./
807 cp $BAMBOORUNTIME/RAW/*.S ./
808 cp $BAMBOORUNTIME/RAW/*.s ./
809 cp ../$tmpbuilddirectory/*.c ./
810 cp ../$tmpbuilddirectory/*.h ./
816 TILERADIR="$CURDIR/tilera"
820 MAKEFILE="Makefile.tilera.$TILERACONFIG"
821 SIMHVC="sim.hvc.$TILERACONFIG"
822 PCIHVC="pci.hvc.$TILERACONFIG"
827 elif $TILERAZLINUXFLAG
828 then # TILERAZLINUXFLAG
829 TILERA_INDIR="ZLinux"
830 MAKEFILE="Makefile.tilera.$TILERACONFIG"
838 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
840 if $TILERAMEMPROFFLAG
841 then # not only with 1 core
842 PCIHVC="$PCIHVC.memprof"
843 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
848 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
849 elif $TILERAZLINUXFLAG
850 then # TILERAZLINUXFLAG
851 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
856 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
861 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
866 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
870 then # profile version
871 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
874 if $ACCURATEPROFILEFLAG
875 then # accurateprofile version
876 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
879 if $PROFILEINTERRUPTFLAG
880 then # profile_interrupt version
881 TILERACFLAGS="${TILERACFLAGS} -DPROFILE_INTERRUPT"
886 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
890 then #INTERRUPT version
891 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
892 fi #INTERRUPT version
895 then #MULTICOREGC version
896 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
900 then # GC_PROFILE version
901 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
905 then # GC_PROFILE_S version
906 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
910 then # SMEMLOCAL version
911 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
915 then # SMEMFIXED version
916 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
920 then # SMEMMIXED version
921 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
925 then # SMEMGLOBAL version
926 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
930 then # CACHE_LOCAL version
931 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
935 then # CACHE_RAN version
936 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
939 if $GCCONTROLLERNEARFLAG
940 then # CONTROLLER_NEAR version
941 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
944 if $GCCONTROLLERREMOTEFLAG
945 then # CONTROLLER_REMOTE version
946 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
949 if $GCSMALLPAGESIZEFLAG
950 then # GC_SMALLPAGESIZE version
951 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
954 if $GCLARGEPAGESIZEFLAG
955 then # GC_LARGEPAGESIZE version
956 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
959 if $GCLARGESHAREDHEAPFLAG
960 then # GC_LARGESHAREDHEAP version
961 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
964 if $GCSMALLPAGESIZEFLAG2
965 then # GC_SMALLPAGESIZE2 version
966 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
969 if $GCLARGESHAREDHEAPFLAG2
970 then # GC_LARGESHAREDHEAP2 version
971 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
975 then # GC_CACHE_ADAPT version
976 TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_ADAPT"
979 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
982 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
983 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
986 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc.56 ./bamboo-vmlinux-pci.hvc.56
988 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
991 cp ../Runtime/Queue.c ./
992 cp ../Runtime/file.c ./
993 cp ../Runtime/math.c ./
994 cp ../Runtime/object.c ./
995 cp ../Runtime/GenericHashtable.c ./
996 cp ../Runtime/SimpleHash.c ./
997 cp ../Runtime/ObjectHash.c ./
998 cp ../Runtime/socket.c ./
999 cp ../Runtime/mem.c ./
1000 cp ../Runtime/GenericHashtable.h ./
1001 cp ../Runtime/mem.h ./
1002 cp ../Runtime/object.h ./
1003 cp ../Runtime/ObjectHash.h ./
1004 cp ../Runtime/Queue.h ./
1005 cp ../Runtime/runtime.h ./
1006 cp ../Runtime/SimpleHash.h ./
1007 cp $BAMBOORUNTIME/multicoretask.c ./
1008 cp $BAMBOORUNTIME/multicoreruntime.c ./
1009 cp $BAMBOORUNTIME/GCSharedHash.c ./
1010 cp $BAMBOORUNTIME/multicoregarbage.c ./
1011 cp $BAMBOORUNTIME/MGCHash.c ./
1012 cp $BAMBOORUNTIME/multicoreruntime.h ./
1013 cp $BAMBOORUNTIME/GCSharedHash.h ./
1014 cp $BAMBOORUNTIME/multicoregc.h ./
1015 cp $BAMBOORUNTIME/multicoregarbage.h ./
1016 cp $BAMBOORUNTIME/multicorehelper.h ./
1017 cp $BAMBOORUNTIME/MGCHash.h ./
1018 cp $BAMBOORUNTIME/multicorecache.h ./
1019 cp ../Tilera/Runtime/*.c ./
1020 cp ../Tilera/Runtime/*.h ./
1021 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
1022 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
1023 if $TILERAZLINUXFLAG
1024 then # TILERAZLINUXFLAG
1025 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
1027 #if $TILERAMEMPROFFLAG
1028 #then # TILERAMEMPROFFLAG
1029 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
1031 cp ../Tilera/lib/* ./
1032 cp ../$tmpbuilddirectory/*.c ./
1033 cp ../$tmpbuilddirectory/*.h ./
1037 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
1040 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
1045 RUNTIMEFILE="$BAMBOORUNTIME/multicoreruntime.c $BAMBOORUNTIME/multicoretask.c"
1046 INCLUDES="$INCLUDES -I$BAMBOORUNTIME"
1048 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
1051 FILES="$RUNTIMEFILE \
1052 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1053 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1054 $ROBUSTROOT/Runtime/ObjectHash.c \
1055 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1056 $ROBUSTROOT/Runtime/math.c \
1057 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1061 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1066 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1071 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1078 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1079 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"
1081 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1082 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"
1088 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1089 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1096 FILES="$FILES $DSMRUNTIME/sandbox.c"
1098 FILES="$FILES $STMRUNTIME/sandbox.c"
1104 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1109 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1114 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1119 FILES="$FILES $tmpbuilddirectory/RuntimeConflictResolver.c $ROBUSTROOT/Runtime/oooJava/hashRCR.c $ROBUSTROOT/Runtime/oooJava/Queue_RCR.c"
1124 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1125 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1126 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1131 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1134 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1136 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1139 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1141 if $THREADSIMULATEFLAG
1143 # -lpthread for pthread functions, -lrt for message queue functions
1144 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1150 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1151 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1156 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1161 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1162 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1167 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1172 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1173 -c $tmpbuilddirectory/methods.c -lm
1178 gcc $INCLUDES $EXTRAOPTIONS \
1179 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1181 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1182 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin