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 -ooojava numberofcores maxseseage
22 echo -mlp <num cores> <max sese age> build mlp code
23 echo -mlpdebug if mlp, report progress and interim results
26 echo -dsm distributed shared memory
27 echo -abortreaders abort readers immediately
28 echo -trueprob double - probabiltiy of true branch
29 echo -dsmcaching -enable caching in dsm runtime
31 echo BAMBOO Multicore options
32 echo -scheduling do task scheduling
33 echo -multicore generate multi-core version binary
34 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
35 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
36 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
37 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
38 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
39 echo -printscheduling print out scheduling graphs
40 echo -printschedulesim print out scheduling simulator result graphs
41 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
42 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
43 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
44 echo "-raw generate raw version binary (should be used together with -multicore)"
45 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
46 echo -multicoregc generate multi-core binary with garbage collection
47 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
48 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
49 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
50 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
51 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
52 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
53 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
54 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
55 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
56 echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)"
57 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
58 echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)"
59 echo -gcprofile build with gcprofile options
60 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
61 echo -accurateprofile build with accurate profile information including pre/post task processing info
62 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
65 echo -abcclose turnoff array boundary checks
66 echo -builddir setup different build directory
67 echo -robustroot set up the ROBUSTROOT to directory other than default one
68 echo -readset turn on readset
69 echo -mac distributed shared memory mac support
70 echo -check generate check code
71 echo -dmalloc link in dmalloc
72 echo -64bit compile for 64 bit machine
73 echo -32bit compile for 32 bit machine
74 echo -joptimize java compiler optimizations
75 echo -noloop turnoff loop optimizations
76 echo -recover compile task code
77 echo -fastcheck fast checkpointing for Bristlecone
78 echo -specdir directory
79 echo -printflat print out flat representation
80 echo -selfloop task - this task cannot self loop forever
81 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
82 echo -taskstate do task state analysis
83 echo -tagstate do tag state analysis
84 echo -optional enable optional
85 echo -debug generate debug symbols
86 echo -prefetch do prefetch analysis
87 echo -garbagestats Print garbage collection statistics
88 echo -webinterface enable web interface
89 echo -runtimedebug printout runtime debug messages
90 echo "-thread use support for multiple threads"
91 echo "-optimize call gcc with -O9 (optimize)"
92 echo "-nooptimize call gcc with -O0 (do not optimize)"
93 echo -curdir directory
94 echo -mainclass class with main method
96 echo -nojava do not run bristlecone compiler
97 echo -instructionfailures inject code for instructionfailures
98 echo -profile build with profile options
99 echo "-enable-assertions execute assert statements during compilation"
100 echo -justanalyze exit after compiler analyses complete
101 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
102 echo "-disall execute to collect whole distribution"
103 echo "-disstart specify the start number of distribution information collection"
104 echo -assembly generate assembly
105 echo -recovery compile recovery code
106 echo -dsmtask support work and task class library
107 echo -recoverystats print out recovery record
111 tmpbuilddirectory="tmpbuilddirectory"
116 ROBUSTROOT=~/research/Robust/src
117 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
118 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
119 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
120 REPAIRROOT=~/research/Repair/RepairCompiler/
138 TILERAZLINUXFLAG=false
139 TILERAMEMPROFFLAG=false
148 ACCURATEPROFILEFLAG=false
151 THREADSIMULATEFLAG=false;
152 MULTICOREGCFLAG=false;
153 GCMEMLOCALFLAG=false;
154 GCMEMFIXEDFLAG=false;
155 GCMEMMIXEDFLAG=false;
156 GCMEMGLOBALFLAG=false;
157 GCCACHELOCALFLAG=false;
158 GCCACHERANFLAG=false;
159 GCCONTROLLERNEARFLAG=false;
160 GCCONTROLLERREMOTEFLAG=false;
161 GCSMALLPAGESIZEFLAG=false;
162 GCLARGEPAGESIZEFLAG=false;
163 GCLARGESHAREDHEAPFLAG=false;
164 GCSMALLPAGESIZEFLAG2=false;
165 GCLARGESHAREDHEAPFLAG2=false;
176 EXITAFTERANALYSIS=false
180 TILERAN1COREFLAG=false
190 if [[ $1 = '-help' ]]
194 elif [[ $1 = '-justanalyze' ]]
196 EXITAFTERANALYSIS=true
197 elif [[ $1 = '-assembly' ]]
200 elif [[ $1 = '-abortreaders' ]]
203 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
204 JAVAOPTS="$JAVAOPTS -abortreaders"
205 elif [[ $1 = '-sandbox' ]]
208 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
209 JAVAOPTS="$JAVAOPTS -sandbox"
210 elif [[ $1 = '-numa' ]]
212 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
214 elif [[ $1 = '-robustroot' ]]
218 elif [[ $1 = '-builddir' ]]
220 tmpbuilddirectory="$2"
222 elif [[ $1 = '-nojava' ]]
225 elif [[ $1 = '-eventmonitor' ]]
227 JAVAOPTS="$JAVAOPTS -eventmonitor"
229 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
230 elif [[ $1 = '-garbagestats' ]]
232 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
233 elif [[ $1 = '-64bit' ]]
235 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
236 elif [[ $1 = '-32bit' ]]
238 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
239 elif [[ $1 = '-fastcheck' ]]
241 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
242 JAVAOPTS="$JAVAOPTS -fastcheck"
248 elif [[ $1 = '-mainclass' ]]
250 JAVAOPTS="$JAVAOPTS -mainclass $2"
252 elif [[ $1 = '-selfloop' ]]
254 JAVAOPTS="$JAVAOPTS -selfloop $2"
256 elif [[ $1 = '-excprefetch' ]]
258 JAVAOPTS="$JAVAOPTS -excprefetch $2"
260 elif [[ $1 = '-arraypad' ]]
262 JAVAOPTS="$JAVAOPTS -arraypad"
263 elif [[ $1 = '-dsm' ]]
265 JAVAOPTS="$JAVAOPTS -dsm"
267 elif [[ $1 = '-fastmemcpy' ]]
270 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
271 elif [[ $1 = '-singleTM' ]]
273 JAVAOPTS="$JAVAOPTS -singleTM"
274 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
276 elif [[ $1 = '-stmarray' ]]
278 JAVAOPTS="$JAVAOPTS -stmarray"
279 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
281 elif [[ $1 = '-dualview' ]]
283 JAVAOPTS="$JAVAOPTS -dualview"
284 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
286 elif [[ $1 = '-readset' ]]
288 JAVAOPTS="$JAVAOPTS -readset"
289 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
290 elif [[ $1 = '-stmdebug' ]]
292 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
293 elif [[ $1 = '-stmstats' ]]
295 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
296 elif [[ $1 = '-stmlog' ]]
298 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
299 elif [[ $1 = '-prefetch' ]]
301 JAVAOPTS="$JAVAOPTS -prefetch"
302 elif [[ $1 = '-transstats' ]]
304 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
305 elif [[ $1 = '-printflat' ]]
307 JAVAOPTS="$JAVAOPTS -printflat"
308 elif [[ $1 = '-trueprob' ]]
310 JAVAOPTS="$JAVAOPTS -trueprob $2"
312 elif [[ $1 = '-inlineatomic' ]]
314 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
316 elif [[ $1 = '-mac' ]]
318 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
319 elif [[ $1 = '-profile' ]]
322 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
323 elif [[ $1 = '-gcprofile' ]]
326 elif [[ $1 = '-gcprofile_s' ]]
329 elif [[ $1 = '-accurateprofile' ]]
331 ACCURATEPROFILEFLAG=true
332 elif [[ $1 = '-useio' ]]
335 elif [[ $1 = '-taskstate' ]]
337 JAVAOPTS="$JAVAOPTS -taskstate"
338 elif [[ $1 = '-tagstate' ]]
340 JAVAOPTS="$JAVAOPTS -tagstate"
341 elif [[ $1 = '-scheduling' ]]
343 JAVAOPTS="$JAVAOPTS -scheduling"
344 elif [[ $1 = '-multicore' ]]
347 JAVAOPTS="$JAVAOPTS -multicore"
348 elif [[ $1 = '-numcore' ]]
350 JAVAOPTS="$JAVAOPTS -numcore $2"
351 if [[ "$2" -gt "1" ]]
353 TILERAN1COREFLAG=true
356 elif [[ $1 = '-numcore4gc' ]]
358 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
360 if [[ "$2" -eq "1" ]]
365 elif [[ $1 = '-raw' ]]
368 JAVAOPTS="$JAVAOPTS -raw"
369 elif [[ $1 = '-tilera_bme' ]]
373 elif [[ $1 = '-tilera_zlinux' ]]
376 TILERAZLINUXFLAG=true
377 elif [[ $1 = '-tilera_memprof' ]]
379 TILERAMEMPROFFLAG=true
380 elif [[ $1 = '-tileraconfig' ]]
384 elif [[ $1 = '-cacheflush' ]]
387 elif [[ $1 = '-rawconfig' ]]
391 elif [[ $1 = '-interrupt' ]]
394 elif [[ $1 = '-abcclose' ]]
396 JAVAOPTS="$JAVAOPTS -abcclose"
397 elif [[ $1 = '-optional' ]]
399 JAVAOPTS="$JAVAOPTS -optional"
401 elif [[ $1 = '-multicoregc' ]]
404 JAVAOPTS="$JAVAOPTS -multicoregc"
405 elif [[ $1 = '-gcmem_local' ]]
408 elif [[ $1 = '-gcmem_fixed' ]]
411 elif [[ $1 = '-gcmem_mixed' ]]
414 elif [[ $1 = '-gcmem_global' ]]
417 elif [[ $1 = '-gccache_local' ]]
419 GCCACHELOCALFLAG=true
420 elif [[ $1 = '-gccache_ran' ]]
423 elif [[ $1 = '-gccontroller_near' ]]
425 GCCONTROLLERNEARFLAG=true
426 elif [[ $1 = '-gccontroller_remote' ]]
428 GCCONTROLLERREMOTEFLAG=true
429 elif [[ $1 = '-gcsmallpagesize' ]]
431 GCSMALLPAGESIZEFLAG=true
432 elif [[ $1 = '-gcsmallpagesize2' ]]
434 GCSMALLPAGESIZEFLAG2=true
435 elif [[ $1 = '-gclargepagesize' ]]
437 GCLARGEPAGESIZEFLAG=true
438 elif [[ $1 = '-gclargesharedheap' ]]
440 GCLARGESHAREDHEAPFLAG=true
441 elif [[ $1 = '-gclargesharedheap2' ]]
443 GCLARGESHAREDHEAPFLAG2=true
444 elif [[ $1 = '-dmalloc' ]]
447 elif [[ $1 = '-recover' ]]
450 JAVAOPTS="$JAVAOPTS -task"
451 elif [[ $1 = '-useprofile' ]]
453 JAVAOPTS="$JAVAOPTS -useprofile $2"
455 elif [[ $1 = '-webinterface' ]]
457 JAVAOPTS="$JAVAOPTS -webinterface"
458 elif [[ $1 = '-instructionfailures' ]]
460 JAVAOPTS="$JAVAOPTS -instructionfailures"
461 elif [[ $1 = '-joptimize' ]]
463 JAVAOPTS="$JAVAOPTS -optimize"
464 elif [[ $1 = '-noloop' ]]
466 JAVAOPTS="$JAVAOPTS -noloop"
467 elif [[ $1 = '-dcopts' ]]
469 JAVAOPTS="$JAVAOPTS -dcopts"
470 elif [[ $1 = '-delaycomp' ]]
472 JAVAOPTS="$JAVAOPTS -delaycomp"
473 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
474 elif [[ $1 = '-hybrid' ]]
476 JAVAOPTS="$JAVAOPTS -hybrid"
477 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
478 elif [[ $1 = '-minimize' ]]
480 JAVAOPTS="$JAVAOPTS -minimize"
482 elif [[ $1 = '-ooojava' ]]
485 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
486 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
490 elif [[ $1 = '-coreprof' ]]
493 JAVAOPTS="$JAVAOPTS -coreprof"
494 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF"
498 elif [[ $1 = '-mlp' ]]
501 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
502 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
506 elif [[ $1 = '-mlpdebug' ]]
508 JAVAOPTS="$JAVAOPTS -mlpdebug"
510 elif [[ $1 = '-check' ]]
513 JAVAOPTS="$JAVAOPTS -conscheck"
514 elif [[ $1 = '-enable-assertions' ]]
516 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
517 elif [[ $1 = '-specdir' ]]
523 elif [[ $1 = '-debug' ]]
526 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
527 elif [[ $1 = '-rawpath' ]]
530 elif [[ $1 = '-runtimedebug' ]]
532 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
533 elif [[ $1 = '-dsmcaching' ]]
535 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
536 elif [[ $1 = '-rangeprefetch' ]]
538 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
539 elif [[ $1 = '-nooptimize' ]]
541 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
542 elif [[ $1 = '-optimize' ]]
544 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
545 elif [[ $1 = '-thread' ]]
547 JAVAOPTS="$JAVAOPTS -thread"
548 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
550 elif [[ $1 = '-recovery' ]]
552 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
554 elif [[ $1 = '-recoverystats' ]]
556 JAVAOPTS="$JAVAOPTS -recoverystats"
557 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
558 elif [[ $1 = '-distributioninfo' ]]
560 JAVAOPTS="$JAVAOPTS -distributioninfo"
561 elif [[ $1 = '-disall' ]]
563 JAVAOPTS="$JAVAOPTS -disall"
564 elif [[ $1 = '-disstart' ]]
566 JAVAOPTS="$JAVAOPTS -disstart $2"
568 elif [[ $1 = '-noc' ]]
571 elif [[ $1 = '-curdir' ]]
575 elif [[ $1 = '-outputdir' ]]
577 JAVAOPTS="$JAVAOPTS -outputdir $2"
580 SRCFILES="$SRCFILES $1"
585 BUILDDIR="$CURDIR/$tmpbuilddirectory"
593 if $CHECKFLAG #Generate structure files for repair tool
595 JAVAOPTS="$JAVAOPTS -struct structfile"
605 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
607 #base bristlecone files
608 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
614 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
617 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
620 #threading java stuff
621 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
624 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
627 # Build bristlecone/java sources
631 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
632 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
633 -dir $BUILDDIR $JAVAOPTS $SRCFILES
637 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
640 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
641 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
648 if $EXITAFTERANALYSIS
653 # Build all of the consistency specs
655 if $CHECKFLAG # CHECKFLAG
658 mkdir $BUILDDIR/specdir
659 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
661 echo > $BUILDDIR/specs
663 # compile specs into C code
664 for i in * # iterate over all directories
666 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
669 cat $BUILDDIR/structfile.struct $i.label > $i.struct
670 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
671 cp size.[c,h] $BUILDDIR/specdir
672 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
673 echo $i >> $BUILDDIR/specs
675 done # iterate over all directories
681 echo > $BUILDDIR/checkers.h
682 for i in `cat $BUILDDIR/specs`
684 gcc -O0 -g -fbounds-check -c $i\_aux.c
685 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
689 #build and link everything
694 MAKEFILE="Makefile.raw"
700 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
704 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
709 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
714 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
718 then # profile version
719 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
722 if $ACCURATEPROFILEFLAG
723 then # accurateprofile version
724 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
729 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
733 then #INTERRUPT version
734 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
735 fi #INTERRUPT version
739 MAKEFILE="$MAKEFILE.io"
740 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
742 MAKEFILE="$MAKEFILE.$RAWCONFIG"
745 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
750 cp ../Runtime/RAW/*.c ./
751 cp ../Runtime/RAW/*.h ./
752 cp ../Runtime/RAW/*.S ./
753 cp ../Runtime/RAW/*.s ./
754 cp ../$tmpbuilddirectory/*.c ./
755 cp ../$tmpbuilddirectory/*.h ./
761 TILERADIR="$CURDIR/tilera"
765 MAKEFILE="Makefile.tilera.$TILERACONFIG"
766 SIMHVC="sim.hvc.$TILERACONFIG"
767 PCIHVC="pci.hvc.$TILERACONFIG"
771 then # not only with 1 core
775 elif $TILERAZLINUXFLAG
776 then # TILERAZLINUXFLAG
777 TILERA_INDIR="ZLinux"
778 MAKEFILE="Makefile.tilera.$TILERACONFIG"
786 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
788 if $TILERAMEMPROFFLAG
789 then # not only with 1 core
790 PCIHVC="$PCIHVC.memprof"
791 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
796 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
797 elif $TILERAZLINUXFLAG
798 then # TILERAZLINUXFLAG
799 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
804 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
809 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
814 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
818 then # profile version
819 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
822 if $ACCURATEPROFILEFLAG
823 then # accurateprofile version
824 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
829 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
833 then #INTERRUPT version
834 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
835 fi #INTERRUPT version
838 then #MULTICOREGC version
839 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
843 then # GC_PROFILE version
844 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
848 then # GC_PROFILE_S version
849 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
853 then # SMEMLOCAL version
854 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
858 then # SMEMFIXED version
859 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
863 then # SMEMMIXED version
864 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
868 then # SMEMGLOBAL version
869 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
873 then # CACHE_LOCAL version
874 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
878 then # CACHE_RAN version
879 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
882 if $GCCONTROLLERNEARFLAG
883 then # CONTROLLER_NEAR version
884 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
887 if $GCCONTROLLERREMOTEFLAG
888 then # CONTROLLER_REMOTE version
889 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
892 if $GCSMALLPAGESIZEFLAG
893 then # GC_SMALLPAGESIZE version
894 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
897 if $GCLARGEPAGESIZEFLAG
898 then # GC_LARGEPAGESIZE version
899 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
902 if $GCLARGESHAREDHEAPFLAG
903 then # GC_LARGESHAREDHEAP version
904 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
907 if $GCSMALLPAGESIZEFLAG2
908 then # GC_SMALLPAGESIZE2 version
909 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
912 if $GCLARGESHAREDHEAPFLAG2
913 then # GC_LARGESHAREDHEAP2 version
914 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
918 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
921 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
922 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
923 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
925 cp ../Runtime/multicoretask.c ./
926 cp ../Runtime/multicoreruntime.c ./
927 cp ../Runtime/Queue.c ./
928 cp ../Runtime/file.c ./
929 cp ../Runtime/math.c ./
930 cp ../Runtime/object.c ./
931 cp ../Runtime/GenericHashtable.c ./
932 cp ../Runtime/SimpleHash.c ./
933 cp ../Runtime/GCSharedHash.c ./
934 cp ../Runtime/ObjectHash.c ./
935 cp ../Runtime/socket.c ./
936 cp ../Runtime/mem.c ./
937 cp ../Runtime/multicoregarbage.c ./
938 cp ../Runtime/MGCHash.c ./
939 cp ../Runtime/GenericHashtable.h ./
940 cp ../Runtime/mem.h ./
941 cp ../Runtime/multicoreruntime.h ./
942 cp ../Runtime/object.h ./
943 cp ../Runtime/ObjectHash.h ./
944 cp ../Runtime/Queue.h ./
945 cp ../Runtime/runtime.h ./
946 cp ../Runtime/SimpleHash.h ./
947 cp ../Runtime/GCSharedHash.h ./
948 cp ../Runtime/multicoregc.h ./
949 cp ../Runtime/multicoregarbage.h ./
950 cp ../Runtime/multicorehelper.h ./
951 cp ../Runtime/MGCHash.h ./
952 cp ../Tilera/Runtime/*.c ./
953 cp ../Tilera/Runtime/*.h ./
954 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
955 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
957 then # TILERAZLINUXFLAG
958 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
960 #if $TILERAMEMPROFFLAG
961 #then # TILERAMEMPROFFLAG
962 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
964 cp ../Tilera/lib/* ./
965 cp ../$tmpbuilddirectory/*.c ./
966 cp ../$tmpbuilddirectory/*.h ./
970 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
973 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
978 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
980 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
983 FILES="$RUNTIMEFILE \
984 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
985 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
986 $ROBUSTROOT/Runtime/ObjectHash.c \
987 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
988 $ROBUSTROOT/Runtime/math.c \
989 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
993 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
998 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1003 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1010 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1011 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"
1013 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1014 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"
1020 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1021 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1028 FILES="$FILES $DSMRUNTIME/sandbox.c"
1030 FILES="$FILES $STMRUNTIME/sandbox.c"
1036 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1041 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1046 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1051 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1052 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1053 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1058 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1061 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1063 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1066 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1068 if $THREADSIMULATEFLAG
1070 # -lpthread for pthread functions, -lrt for message queue functions
1071 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1077 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1078 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1083 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1088 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1089 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1094 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1099 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1100 -c $tmpbuilddirectory/methods.c -lm
1105 gcc $INCLUDES $EXTRAOPTIONS \
1106 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1108 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1109 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin