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 -dsm distributed shared memory
21 echo -abortreaders abort readers immediately
22 echo -trueprob double - probabiltiy of true branch
23 echo -dsmcaching -enable caching in dsm runtime
25 echo BAMBOO Multicore options
26 echo -scheduling do task scheduling
27 echo -multicore generate multi-core version binary
28 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
29 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
30 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
31 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
32 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
33 echo -printscheduling print out scheduling graphs
34 echo -printschedulesim print out scheduling simulator result graphs
35 echo -abcclose close the array boundary check
36 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
37 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
38 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
39 echo "-raw generate raw version binary (should be used together with -multicore)"
40 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
41 echo -multicoregc generate multi-core binary with garbage collection
42 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
43 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
44 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
45 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
46 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
47 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
48 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
49 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
50 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
51 echo "-gcsmallpagesize set the gc shared memory to use small page size (should be used together with -multicoregc)"
52 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
53 echo "-gclargesharedheap set the gc shared memory as large (should be used together with -multicoregc)"
54 echo -gcprofile build with gcprofile options
55 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
56 echo -accurateprofile build with accurate profile information including pre/post task processing info
57 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
60 echo -builddir setup different build directory
61 echo -robustroot set up the ROBUSTROOT to directory other than default one
62 echo -readset turn on readset
63 echo -mac distributed shared memory mac support
64 echo -check generate check code
65 echo -dmalloc link in dmalloc
66 echo -64bit compile for 64 bit machine
67 echo -32bit compile for 32 bit machine
68 echo -joptimize java compiler optimizations
69 echo -recover compile task code
70 echo -fastcheck fast checkpointing for Bristlecone
71 echo -specdir directory
72 echo -printflat print out flat representation
73 echo -selfloop task - this task cannot self loop forever
74 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
75 echo -taskstate do task state analysis
76 echo -tagstate do tag state analysis
77 echo -optional enable optional
78 echo -debug generate debug symbols
79 echo -prefetch do prefetch analysis
80 echo -garbagestats Print garbage collection statistics
81 echo -webinterface enable web interface
82 echo -runtimedebug printout runtime debug messages
83 echo "-thread use support for multiple threads"
84 echo "-optimize call gcc with -O9 (optimize)"
85 echo "-nooptimize call gcc with -O0 (do not optimize)"
86 echo -curdir directory
87 echo -mainclass class with main method
89 echo -nojava do not run bristlecone compiler
90 echo -instructionfailures inject code for instructionfailures
91 echo -profile build with profile options
92 echo "-enable-assertions execute assert statements during compilation"
93 echo -justanalyze exit after compiler analyses complete
94 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
95 echo "-disall execute to collect whole distribution"
96 echo "-disstart specify the start number of distribution information collection"
97 echo -assembly generate assembly
98 echo -recovery compile recovery code
99 echo -dsmtask support work and task class library
100 echo -recoverystats print out recovery record
104 tmpbuilddirectory="tmpbuilddirectory"
108 ROBUSTROOT=~/research/Robust/src
109 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
110 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
111 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
112 REPAIRROOT=~/research/Repair/RepairCompiler/
130 TILERAZLINUXFLAG=false
131 TILERAMEMPROFFLAG=false
140 ACCURATEPROFILEFLAG=false
143 THREADSIMULATEFLAG=false;
144 MULTICOREGCFLAG=false;
145 GCMEMLOCALFLAG=false;
146 GCMEMFIXEDFLAG=false;
147 GCMEMMIXEDFLAG=false;
148 GCMEMGLOBALFLAG=false;
149 GCCACHELOCALFLAG=false;
150 GCCACHERANFLAG=false;
151 GCCONTROLLERNEARFLAG=false;
152 GCCONTROLLERREMOTEFLAG=false;
153 GCSMALLPAGESIZEFLAG=false;
154 GCLARGEPAGESIZEFLAG=false;
155 GCLARGESHAREDHEAPFLAG=false;
166 EXITAFTERANALYSIS=false
170 TILERAN1COREFLAG=false
180 if [[ $1 = '-help' ]]
184 elif [[ $1 = '-justanalyze' ]]
186 EXITAFTERANALYSIS=true
187 elif [[ $1 = '-assembly' ]]
190 elif [[ $1 = '-abortreaders' ]]
193 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
194 JAVAOPTS="$JAVAOPTS -abortreaders"
195 elif [[ $1 = '-sandbox' ]]
198 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
199 JAVAOPTS="$JAVAOPTS -sandbox"
200 elif [[ $1 = '-numa' ]]
202 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
204 elif [[ $1 = '-robustroot' ]]
208 elif [[ $1 = '-builddir' ]]
210 tmpbuilddirectory="$2"
212 elif [[ $1 = '-nojava' ]]
215 elif [[ $1 = '-eventmonitor' ]]
217 JAVAOPTS="$JAVAOPTS -eventmonitor"
219 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
220 elif [[ $1 = '-garbagestats' ]]
222 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
223 elif [[ $1 = '-64bit' ]]
225 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
226 elif [[ $1 = '-32bit' ]]
228 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
229 elif [[ $1 = '-fastcheck' ]]
231 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
232 JAVAOPTS="$JAVAOPTS -fastcheck"
238 elif [[ $1 = '-mainclass' ]]
240 JAVAOPTS="$JAVAOPTS -mainclass $2"
242 elif [[ $1 = '-selfloop' ]]
244 JAVAOPTS="$JAVAOPTS -selfloop $2"
246 elif [[ $1 = '-excprefetch' ]]
248 JAVAOPTS="$JAVAOPTS -excprefetch $2"
250 elif [[ $1 = '-arraypad' ]]
252 JAVAOPTS="$JAVAOPTS -arraypad"
253 elif [[ $1 = '-dsm' ]]
255 JAVAOPTS="$JAVAOPTS -dsm"
257 elif [[ $1 = '-fastmemcpy' ]]
260 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
261 elif [[ $1 = '-singleTM' ]]
263 JAVAOPTS="$JAVAOPTS -singleTM"
264 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
266 elif [[ $1 = '-stmarray' ]]
268 JAVAOPTS="$JAVAOPTS -stmarray"
269 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
271 elif [[ $1 = '-dualview' ]]
273 JAVAOPTS="$JAVAOPTS -dualview"
274 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
276 elif [[ $1 = '-readset' ]]
278 JAVAOPTS="$JAVAOPTS -readset"
279 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
280 elif [[ $1 = '-stmdebug' ]]
282 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
283 elif [[ $1 = '-stmstats' ]]
285 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
286 elif [[ $1 = '-stmlog' ]]
288 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
289 elif [[ $1 = '-prefetch' ]]
291 JAVAOPTS="$JAVAOPTS -prefetch"
292 elif [[ $1 = '-transstats' ]]
294 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
295 elif [[ $1 = '-printflat' ]]
297 JAVAOPTS="$JAVAOPTS -printflat"
298 elif [[ $1 = '-trueprob' ]]
300 JAVAOPTS="$JAVAOPTS -trueprob $2"
302 elif [[ $1 = '-inlineatomic' ]]
304 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
306 elif [[ $1 = '-mac' ]]
308 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
309 elif [[ $1 = '-profile' ]]
312 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
313 elif [[ $1 = '-gcprofile' ]]
316 elif [[ $1 = '-gcprofile_s' ]]
319 elif [[ $1 = '-accurateprofile' ]]
321 ACCURATEPROFILEFLAG=true
322 elif [[ $1 = '-useio' ]]
325 elif [[ $1 = '-taskstate' ]]
327 JAVAOPTS="$JAVAOPTS -taskstate"
328 elif [[ $1 = '-tagstate' ]]
330 JAVAOPTS="$JAVAOPTS -tagstate"
331 elif [[ $1 = '-scheduling' ]]
333 JAVAOPTS="$JAVAOPTS -scheduling"
334 elif [[ $1 = '-multicore' ]]
337 JAVAOPTS="$JAVAOPTS -multicore"
338 elif [[ $1 = '-numcore' ]]
340 JAVAOPTS="$JAVAOPTS -numcore $2"
341 if [[ "$2" -gt "1" ]]
343 TILERAN1COREFLAG=true
346 elif [[ $1 = '-numcore4gc' ]]
348 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
350 if [[ "$2" -eq "1" ]]
355 elif [[ $1 = '-raw' ]]
358 JAVAOPTS="$JAVAOPTS -raw"
359 elif [[ $1 = '-tilera_bme' ]]
363 elif [[ $1 = '-tilera_zlinux' ]]
366 TILERAZLINUXFLAG=true
367 elif [[ $1 = '-tilera_memprof' ]]
369 TILERAMEMPROFFLAG=true
370 elif [[ $1 = '-tileraconfig' ]]
374 elif [[ $1 = '-cacheflush' ]]
377 elif [[ $1 = '-rawconfig' ]]
381 elif [[ $1 = '-interrupt' ]]
384 elif [[ $1 = '-abcclose' ]]
386 JAVAOPTS="$JAVAOPTS -abcclose"
387 elif [[ $1 = '-optional' ]]
389 JAVAOPTS="$JAVAOPTS -optional"
391 elif [[ $1 = '-multicoregc' ]]
394 JAVAOPTS="$JAVAOPTS -multicoregc"
395 elif [[ $1 = '-gcmem_local' ]]
398 elif [[ $1 = '-gcmem_fixed' ]]
401 elif [[ $1 = '-gcmem_mixed' ]]
404 elif [[ $1 = '-gcmem_global' ]]
407 elif [[ $1 = '-gccache_local' ]]
409 GCCACHELOCALFLAG=true
410 elif [[ $1 = '-gccache_ran' ]]
413 elif [[ $1 = '-gccontroller_near' ]]
415 GCCONTROLLERNEARFLAG=true
416 elif [[ $1 = '-gccontroller_remote' ]]
418 GCCONTROLLERREMOTEFLAG=true
419 elif [[ $1 = '-gcsmallpagesize' ]]
421 GCSMALLPAGESIZEFLAG=true
422 elif [[ $1 = '-gclargepagesize' ]]
424 GCLARGEPAGESIZEFLAG=true
425 elif [[ $1 = '-gclargesharedheap' ]]
427 GCLARGESHAREDHEAPFLAG=true
428 elif [[ $1 = '-dmalloc' ]]
431 elif [[ $1 = '-recover' ]]
434 JAVAOPTS="$JAVAOPTS -task"
435 elif [[ $1 = '-useprofile' ]]
437 JAVAOPTS="$JAVAOPTS -useprofile $2"
439 elif [[ $1 = '-webinterface' ]]
441 JAVAOPTS="$JAVAOPTS -webinterface"
442 elif [[ $1 = '-instructionfailures' ]]
444 JAVAOPTS="$JAVAOPTS -instructionfailures"
445 elif [[ $1 = '-joptimize' ]]
447 JAVAOPTS="$JAVAOPTS -optimize"
448 elif [[ $1 = '-dcopts' ]]
450 JAVAOPTS="$JAVAOPTS -dcopts"
451 elif [[ $1 = '-delaycomp' ]]
453 JAVAOPTS="$JAVAOPTS -delaycomp"
454 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
455 elif [[ $1 = '-hybrid' ]]
457 JAVAOPTS="$JAVAOPTS -hybrid"
458 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
459 elif [[ $1 = '-minimize' ]]
461 JAVAOPTS="$JAVAOPTS -minimize"
463 elif [[ $1 = '-ooojava' ]]
466 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
467 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
471 elif [[ $1 = '-mlp' ]]
474 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
475 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
479 elif [[ $1 = '-mlpdebug' ]]
481 JAVAOPTS="$JAVAOPTS -mlpdebug"
483 elif [[ $1 = '-check' ]]
486 JAVAOPTS="$JAVAOPTS -conscheck"
487 elif [[ $1 = '-enable-assertions' ]]
489 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
490 elif [[ $1 = '-specdir' ]]
496 elif [[ $1 = '-debug' ]]
499 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
500 elif [[ $1 = '-rawpath' ]]
503 elif [[ $1 = '-runtimedebug' ]]
505 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
506 elif [[ $1 = '-dsmcaching' ]]
508 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
509 elif [[ $1 = '-rangeprefetch' ]]
511 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
512 elif [[ $1 = '-nooptimize' ]]
514 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
515 elif [[ $1 = '-optimize' ]]
517 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
518 elif [[ $1 = '-thread' ]]
520 JAVAOPTS="$JAVAOPTS -thread"
521 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
523 elif [[ $1 = '-recovery' ]]
525 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
527 elif [[ $1 = '-recoverystats' ]]
529 JAVAOPTS="$JAVAOPTS -recoverystats"
530 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
531 elif [[ $1 = '-distributioninfo' ]]
533 JAVAOPTS="$JAVAOPTS -distributioninfo"
534 elif [[ $1 = '-disall' ]]
536 JAVAOPTS="$JAVAOPTS -disall"
537 elif [[ $1 = '-disstart' ]]
539 JAVAOPTS="$JAVAOPTS -disstart $2"
541 elif [[ $1 = '-noc' ]]
544 elif [[ $1 = '-curdir' ]]
548 elif [[ $1 = '-outputdir' ]]
550 JAVAOPTS="$JAVAOPTS -outputdir $2"
553 SRCFILES="$SRCFILES $1"
558 BUILDDIR="$CURDIR/$tmpbuilddirectory"
566 if $CHECKFLAG #Generate structure files for repair tool
568 JAVAOPTS="$JAVAOPTS -struct structfile"
578 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
580 #base bristlecone files
581 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
587 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
590 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
593 #threading java stuff
594 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
597 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
600 # Build bristlecone/java sources
604 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
605 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
606 -dir $BUILDDIR $JAVAOPTS $SRCFILES
610 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
613 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
614 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
621 if $EXITAFTERANALYSIS
626 # Build all of the consistency specs
628 if $CHECKFLAG # CHECKFLAG
631 mkdir $BUILDDIR/specdir
632 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
634 echo > $BUILDDIR/specs
636 # compile specs into C code
637 for i in * # iterate over all directories
639 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
642 cat $BUILDDIR/structfile.struct $i.label > $i.struct
643 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
644 cp size.[c,h] $BUILDDIR/specdir
645 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
646 echo $i >> $BUILDDIR/specs
648 done # iterate over all directories
654 echo > $BUILDDIR/checkers.h
655 for i in `cat $BUILDDIR/specs`
657 gcc -O0 -g -fbounds-check -c $i\_aux.c
658 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
662 #build and link everything
667 MAKEFILE="Makefile.raw"
673 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
677 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
682 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
687 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
691 then # profile version
692 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
695 if $ACCURATEPROFILEFLAG
696 then # accurateprofile version
697 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
702 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
706 then #INTERRUPT version
707 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
708 fi #INTERRUPT version
712 MAKEFILE="$MAKEFILE.io"
713 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
715 MAKEFILE="$MAKEFILE.$RAWCONFIG"
718 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
723 cp ../Runtime/RAW/*.c ./
724 cp ../Runtime/RAW/*.h ./
725 cp ../Runtime/RAW/*.S ./
726 cp ../Runtime/RAW/*.s ./
727 cp ../$tmpbuilddirectory/*.c ./
728 cp ../$tmpbuilddirectory/*.h ./
734 TILERADIR="$CURDIR/tilera"
738 MAKEFILE="Makefile.tilera.$TILERACONFIG"
739 SIMHVC="sim.hvc.$TILERACONFIG"
740 PCIHVC="pci.hvc.$TILERACONFIG"
744 then # not only with 1 core
748 elif $TILERAZLINUXFLAG
749 then # TILERAZLINUXFLAG
750 TILERA_INDIR="ZLinux"
751 MAKEFILE="Makefile.tilera.$TILERACONFIG"
759 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
761 if $TILERAMEMPROFFLAG
762 then # not only with 1 core
763 PCIHVC="$PCIHVC.memprof"
764 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
769 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
770 elif $TILERAZLINUXFLAG
771 then # TILERAZLINUXFLAG
772 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
777 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
782 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
787 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
791 then # profile version
792 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
795 if $ACCURATEPROFILEFLAG
796 then # accurateprofile version
797 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
802 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
806 then #INTERRUPT version
807 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
808 fi #INTERRUPT version
811 then #MULTICOREGC version
812 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
816 then # GC_PROFILE version
817 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
821 then # GC_PROFILE_S version
822 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
826 then # SMEMLOCAL version
827 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
831 then # SMEMFIXED version
832 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
836 then # SMEMMIXED version
837 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
841 then # SMEMGLOBAL version
842 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
846 then # CACHE_LOCAL version
847 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
851 then # CACHE_RAN version
852 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
855 if $GCCONTROLLERNEARFLAG
856 then # CONTROLLER_NEAR version
857 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
860 if $GCCONTROLLERREMOTEFLAG
861 then # CONTROLLER_REMOTE version
862 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
865 if $GCSMALLPAGESIZEFLAG
866 then # GC_SMALLPAGESIZE version
867 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
870 if $GCLARGEPAGESIZEFLAG
871 then # GC_LARGEPAGESIZE version
872 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
875 if $GCLARGESHAREDHEAPFLAG
876 then # GC_LARGESHAREDHEAP version
877 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
881 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
884 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
885 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
886 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
888 cp ../Runtime/multicoretask.c ./
889 cp ../Runtime/multicoreruntime.c ./
890 cp ../Runtime/Queue.c ./
891 cp ../Runtime/file.c ./
892 cp ../Runtime/math.c ./
893 cp ../Runtime/object.c ./
894 cp ../Runtime/GenericHashtable.c ./
895 cp ../Runtime/SimpleHash.c ./
896 cp ../Runtime/GCSharedHash.c ./
897 cp ../Runtime/ObjectHash.c ./
898 cp ../Runtime/socket.c ./
899 cp ../Runtime/mem.c ./
900 cp ../Runtime/multicoregarbage.c ./
901 cp ../Runtime/MGCHash.c ./
902 cp ../Runtime/GenericHashtable.h ./
903 cp ../Runtime/mem.h ./
904 cp ../Runtime/multicoreruntime.h ./
905 cp ../Runtime/object.h ./
906 cp ../Runtime/ObjectHash.h ./
907 cp ../Runtime/Queue.h ./
908 cp ../Runtime/runtime.h ./
909 cp ../Runtime/SimpleHash.h ./
910 cp ../Runtime/GCSharedHash.h ./
911 cp ../Runtime/multicoregc.h ./
912 cp ../Runtime/multicoregarbage.h ./
913 cp ../Runtime/multicorehelper.h ./
914 cp ../Runtime/MGCHash.h ./
915 cp ../Tilera/Runtime/*.c ./
916 cp ../Tilera/Runtime/*.h ./
917 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
918 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
920 then # TILERAZLINUXFLAG
921 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
923 #if $TILERAMEMPROFFLAG
924 #then # TILERAMEMPROFFLAG
925 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
927 cp ../Tilera/lib/* ./
928 cp ../$tmpbuilddirectory/*.c ./
929 cp ../$tmpbuilddirectory/*.h ./
933 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
936 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
941 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
943 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
946 FILES="$RUNTIMEFILE \
947 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
948 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
949 $ROBUSTROOT/Runtime/ObjectHash.c \
950 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
951 $ROBUSTROOT/Runtime/math.c \
952 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
956 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
961 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
966 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
973 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
974 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"
976 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
977 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"
983 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
984 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
991 FILES="$FILES $DSMRUNTIME/sandbox.c"
993 FILES="$FILES $STMRUNTIME/sandbox.c"
999 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1004 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1009 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1010 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1011 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1016 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1019 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1021 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1024 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1026 if $THREADSIMULATEFLAG
1028 # -lpthread for pthread functions, -lrt for message queue functions
1029 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1035 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1036 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1041 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1046 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1047 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1052 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1057 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1058 -c $tmpbuilddirectory/methods.c -lm
1063 gcc $INCLUDES $EXTRAOPTIONS \
1064 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1066 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1067 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin