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 -I$ROBUSTROOT/Runtime/coreprof"
496 elif [[ $1 = '-mlp' ]]
499 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
500 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
504 elif [[ $1 = '-mlpdebug' ]]
506 JAVAOPTS="$JAVAOPTS -mlpdebug"
508 elif [[ $1 = '-check' ]]
511 JAVAOPTS="$JAVAOPTS -conscheck"
512 elif [[ $1 = '-enable-assertions' ]]
514 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
515 elif [[ $1 = '-specdir' ]]
521 elif [[ $1 = '-debug' ]]
524 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
525 elif [[ $1 = '-rawpath' ]]
528 elif [[ $1 = '-runtimedebug' ]]
530 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
531 elif [[ $1 = '-dsmcaching' ]]
533 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
534 elif [[ $1 = '-rangeprefetch' ]]
536 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
537 elif [[ $1 = '-nooptimize' ]]
539 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
540 elif [[ $1 = '-optimize' ]]
542 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
543 elif [[ $1 = '-thread' ]]
545 JAVAOPTS="$JAVAOPTS -thread"
546 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
548 elif [[ $1 = '-recovery' ]]
550 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
552 elif [[ $1 = '-recoverystats' ]]
554 JAVAOPTS="$JAVAOPTS -recoverystats"
555 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
556 elif [[ $1 = '-distributioninfo' ]]
558 JAVAOPTS="$JAVAOPTS -distributioninfo"
559 elif [[ $1 = '-disall' ]]
561 JAVAOPTS="$JAVAOPTS -disall"
562 elif [[ $1 = '-disstart' ]]
564 JAVAOPTS="$JAVAOPTS -disstart $2"
566 elif [[ $1 = '-noc' ]]
569 elif [[ $1 = '-curdir' ]]
573 elif [[ $1 = '-outputdir' ]]
575 JAVAOPTS="$JAVAOPTS -outputdir $2"
578 SRCFILES="$SRCFILES $1"
583 BUILDDIR="$CURDIR/$tmpbuilddirectory"
591 if $CHECKFLAG #Generate structure files for repair tool
593 JAVAOPTS="$JAVAOPTS -struct structfile"
603 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
605 #base bristlecone files
606 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
612 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
615 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
618 #threading java stuff
619 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
622 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
625 # Build bristlecone/java sources
629 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
630 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
631 -dir $BUILDDIR $JAVAOPTS $SRCFILES
635 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
638 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
639 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
646 if $EXITAFTERANALYSIS
651 # Build all of the consistency specs
653 if $CHECKFLAG # CHECKFLAG
656 mkdir $BUILDDIR/specdir
657 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
659 echo > $BUILDDIR/specs
661 # compile specs into C code
662 for i in * # iterate over all directories
664 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
667 cat $BUILDDIR/structfile.struct $i.label > $i.struct
668 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
669 cp size.[c,h] $BUILDDIR/specdir
670 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
671 echo $i >> $BUILDDIR/specs
673 done # iterate over all directories
679 echo > $BUILDDIR/checkers.h
680 for i in `cat $BUILDDIR/specs`
682 gcc -O0 -g -fbounds-check -c $i\_aux.c
683 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
687 #build and link everything
692 MAKEFILE="Makefile.raw"
698 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
702 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
707 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
712 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
716 then # profile version
717 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
720 if $ACCURATEPROFILEFLAG
721 then # accurateprofile version
722 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
727 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
731 then #INTERRUPT version
732 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
733 fi #INTERRUPT version
737 MAKEFILE="$MAKEFILE.io"
738 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
740 MAKEFILE="$MAKEFILE.$RAWCONFIG"
743 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
748 cp ../Runtime/RAW/*.c ./
749 cp ../Runtime/RAW/*.h ./
750 cp ../Runtime/RAW/*.S ./
751 cp ../Runtime/RAW/*.s ./
752 cp ../$tmpbuilddirectory/*.c ./
753 cp ../$tmpbuilddirectory/*.h ./
759 TILERADIR="$CURDIR/tilera"
763 MAKEFILE="Makefile.tilera.$TILERACONFIG"
764 SIMHVC="sim.hvc.$TILERACONFIG"
765 PCIHVC="pci.hvc.$TILERACONFIG"
769 then # not only with 1 core
773 elif $TILERAZLINUXFLAG
774 then # TILERAZLINUXFLAG
775 TILERA_INDIR="ZLinux"
776 MAKEFILE="Makefile.tilera.$TILERACONFIG"
784 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
786 if $TILERAMEMPROFFLAG
787 then # not only with 1 core
788 PCIHVC="$PCIHVC.memprof"
789 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
794 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
795 elif $TILERAZLINUXFLAG
796 then # TILERAZLINUXFLAG
797 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
802 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
807 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
812 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
816 then # profile version
817 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
820 if $ACCURATEPROFILEFLAG
821 then # accurateprofile version
822 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
827 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
831 then #INTERRUPT version
832 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
833 fi #INTERRUPT version
836 then #MULTICOREGC version
837 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
841 then # GC_PROFILE version
842 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
846 then # GC_PROFILE_S version
847 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
851 then # SMEMLOCAL version
852 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
856 then # SMEMFIXED version
857 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
861 then # SMEMMIXED version
862 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
866 then # SMEMGLOBAL version
867 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
871 then # CACHE_LOCAL version
872 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
876 then # CACHE_RAN version
877 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
880 if $GCCONTROLLERNEARFLAG
881 then # CONTROLLER_NEAR version
882 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
885 if $GCCONTROLLERREMOTEFLAG
886 then # CONTROLLER_REMOTE version
887 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
890 if $GCSMALLPAGESIZEFLAG
891 then # GC_SMALLPAGESIZE version
892 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
895 if $GCLARGEPAGESIZEFLAG
896 then # GC_LARGEPAGESIZE version
897 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
900 if $GCLARGESHAREDHEAPFLAG
901 then # GC_LARGESHAREDHEAP version
902 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
905 if $GCSMALLPAGESIZEFLAG2
906 then # GC_SMALLPAGESIZE2 version
907 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
910 if $GCLARGESHAREDHEAPFLAG2
911 then # GC_LARGESHAREDHEAP2 version
912 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
916 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
919 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
920 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
921 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
923 cp ../Runtime/multicoretask.c ./
924 cp ../Runtime/multicoreruntime.c ./
925 cp ../Runtime/Queue.c ./
926 cp ../Runtime/file.c ./
927 cp ../Runtime/math.c ./
928 cp ../Runtime/object.c ./
929 cp ../Runtime/GenericHashtable.c ./
930 cp ../Runtime/SimpleHash.c ./
931 cp ../Runtime/GCSharedHash.c ./
932 cp ../Runtime/ObjectHash.c ./
933 cp ../Runtime/socket.c ./
934 cp ../Runtime/mem.c ./
935 cp ../Runtime/multicoregarbage.c ./
936 cp ../Runtime/MGCHash.c ./
937 cp ../Runtime/GenericHashtable.h ./
938 cp ../Runtime/mem.h ./
939 cp ../Runtime/multicoreruntime.h ./
940 cp ../Runtime/object.h ./
941 cp ../Runtime/ObjectHash.h ./
942 cp ../Runtime/Queue.h ./
943 cp ../Runtime/runtime.h ./
944 cp ../Runtime/SimpleHash.h ./
945 cp ../Runtime/GCSharedHash.h ./
946 cp ../Runtime/multicoregc.h ./
947 cp ../Runtime/multicoregarbage.h ./
948 cp ../Runtime/multicorehelper.h ./
949 cp ../Runtime/MGCHash.h ./
950 cp ../Tilera/Runtime/*.c ./
951 cp ../Tilera/Runtime/*.h ./
952 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
953 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
955 then # TILERAZLINUXFLAG
956 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
958 #if $TILERAMEMPROFFLAG
959 #then # TILERAMEMPROFFLAG
960 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
962 cp ../Tilera/lib/* ./
963 cp ../$tmpbuilddirectory/*.c ./
964 cp ../$tmpbuilddirectory/*.h ./
968 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
971 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
976 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
978 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
981 FILES="$RUNTIMEFILE \
982 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
983 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
984 $ROBUSTROOT/Runtime/ObjectHash.c \
985 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
986 $ROBUSTROOT/Runtime/math.c \
987 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
991 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
996 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1001 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1008 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1009 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"
1011 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1012 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"
1018 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1019 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1026 FILES="$FILES $DSMRUNTIME/sandbox.c"
1028 FILES="$FILES $STMRUNTIME/sandbox.c"
1034 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1039 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1044 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1049 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1050 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1051 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1056 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1059 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1061 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1064 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1066 if $THREADSIMULATEFLAG
1068 # -lpthread for pthread functions, -lrt for message queue functions
1069 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1075 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1076 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1081 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1086 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1087 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1092 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1097 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1098 -c $tmpbuilddirectory/methods.c -lm
1103 gcc $INCLUDES $EXTRAOPTIONS \
1104 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1106 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1107 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin