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-checkoverflow ONLY use for debugging event overflow
22 echo "-ooojava <numberofcores> <maxseseage>"
23 echo -ooodebug general OOOJava debugging messages
24 echo -rcr turn on runtime conflict resolver
26 echo Disjoint Reachability Analysis options
27 echo -disjoint enable analysis
28 echo -disjoint-k set k-limit for heap nodes per allocation site
29 echo "-disjoint-write-dots <all/final> write reach graphs for all method sols. or only final sols."
30 echo -disjoint-write-initial-contexts write reach graphs for callee initial contexts from all call sites
31 echo -disjoint-write-ihms write reach graphs for each call site\'s Initial Heap Model
32 echo "-disjoint-alias-file <filename> <normal/tabbed> write sharing for normal human reading or LaTeX tabbed"
33 echo "-disjoint-debug-callsite <callee> <caller> <visit to start> <num caps> <T/F stop after>"
34 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"
35 echo "-disjoint-debug-snap-method <method> <visit to start> <num caps> <T/F stop after>"
36 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"
37 echo "-disjoint-dvisit-stack use stack strat to visit descriptors (tasks or methods)"
38 echo -disjoint-dvisit-stack-callees-on-top alternate stack strat
39 echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors
40 echo -disjoint-desire-determinism set above interproc for determinism
41 echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
43 echo "-mlp <num cores> <max sese age> build mlp code"
44 echo -mlpdebug if mlp, report progress and interim results
47 echo -dsm distributed shared memory
48 echo -abortreaders abort readers immediately
49 echo -trueprob double - probabiltiy of true branch
50 echo -dsmcaching -enable caching in dsm runtime
52 echo BAMBOO Multicore options
53 echo -scheduling do task scheduling
54 echo -multicore generate multi-core version binary
55 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
56 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
57 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
58 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
59 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
60 echo -printscheduling print out scheduling graphs
61 echo -printschedulesim print out scheduling simulator result graphs
62 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
63 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
64 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
65 echo "-raw generate raw version binary (should be used together with -multicore)"
66 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
67 echo -multicoregc generate multi-core binary with garbage collection
68 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
69 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
70 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
71 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
72 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
73 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
74 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
75 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
76 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
77 echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)"
78 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
79 echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)"
80 echo -gcprofile build with gcprofile options
81 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
82 echo -accurateprofile build with accurate profile information including pre/post task processing info
83 echo -profile_interrupt build with profile information of interrupts
84 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
87 echo -abcclose turnoff array boundary checks
88 echo -builddir setup different build directory
89 echo -robustroot set up the ROBUSTROOT to directory other than default one
90 echo -readset turn on readset
91 echo -mac distributed shared memory mac support
92 echo -check generate check code
93 echo -dmalloc link in dmalloc
94 echo -64bit compile for 64 bit machine
95 echo -32bit compile for 32 bit machine
96 echo -joptimize java compiler optimizations
97 echo -noloop turnoff loop optimizations
98 echo -recover compile task code
99 echo -fastcheck fast checkpointing for Bristlecone
100 echo -specdir directory
101 echo -printflat print out flat representation
102 echo -selfloop task - this task cannot self loop forever
103 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
104 echo -taskstate do task state analysis
105 echo -tagstate do tag state analysis
106 echo -optional enable optional
107 echo -debug generate debug symbols
108 echo -prefetch do prefetch analysis
109 echo -heapsize-mb NUM set initial heap size in MB, default is 256
110 echo -garbagestats Print garbage collection statistics
111 echo -webinterface enable web interface
112 echo -runtimedebug printout runtime debug messages
113 echo "-thread use support for multiple threads"
114 echo "-optimize call gcc with -O9 (optimize)"
115 echo "-nooptimize call gcc with -O0 (do not optimize)"
116 echo -curdir directory
117 echo -mainclass class with main method
119 echo -nojava do not run bristlecone compiler
120 echo -instructionfailures inject code for instructionfailures
121 echo -profile build with profile options
122 echo "-enable-assertions execute assert statements during compilation"
123 echo -justanalyze exit after compiler analyses complete
124 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
125 echo "-disall execute to collect whole distribution"
126 echo "-disstart specify the start number of distribution information collection"
127 echo -assembly generate assembly
128 echo -recovery compile recovery code
129 echo -dsmtask support work and task class library
130 echo -recoverystats print out recovery record
134 tmpbuilddirectory="tmpbuilddirectory"
139 ROBUSTROOT=~/research/Robust/src
140 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
141 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
142 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
143 REPAIRROOT=~/research/Repair/RepairCompiler/
162 TILERAZLINUXFLAG=false
163 TILERAMEMPROFFLAG=false
172 ACCURATEPROFILEFLAG=false
173 PROFILEINTERRUPTFLAG=false
176 THREADSIMULATEFLAG=false;
177 MULTICOREGCFLAG=false;
178 GCMEMLOCALFLAG=false;
179 GCMEMFIXEDFLAG=false;
180 GCMEMMIXEDFLAG=false;
181 GCMEMGLOBALFLAG=false;
182 GCCACHELOCALFLAG=false;
183 GCCACHERANFLAG=false;
184 GCCONTROLLERNEARFLAG=false;
185 GCCONTROLLERREMOTEFLAG=false;
186 GCSMALLPAGESIZEFLAG=false;
187 GCLARGEPAGESIZEFLAG=false;
188 GCLARGESHAREDHEAPFLAG=false;
189 GCSMALLPAGESIZEFLAG2=false;
190 GCLARGESHAREDHEAPFLAG2=false;
201 EXITAFTERANALYSIS=false
204 TILERAN1COREFLAG=false
205 TILERA56COREFLAG=false
215 if [[ $1 = '-help' ]]
219 elif [[ $1 = '-justanalyze' ]]
221 EXITAFTERANALYSIS=true
222 elif [[ $1 = '-assembly' ]]
225 elif [[ $1 = '-abortreaders' ]]
228 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
229 JAVAOPTS="$JAVAOPTS -abortreaders"
230 elif [[ $1 = '-sandbox' ]]
233 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
234 JAVAOPTS="$JAVAOPTS -sandbox"
235 elif [[ $1 = '-numa' ]]
237 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
239 elif [[ $1 = '-robustroot' ]]
243 elif [[ $1 = '-builddir' ]]
245 tmpbuilddirectory="$2"
247 elif [[ $1 = '-nojava' ]]
250 elif [[ $1 = '-eventmonitor' ]]
252 JAVAOPTS="$JAVAOPTS -eventmonitor"
254 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
255 elif [[ $1 = '-garbagestats' ]]
257 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
258 elif [[ $1 = '-64bit' ]]
260 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
261 elif [[ $1 = '-32bit' ]]
263 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
264 elif [[ $1 = '-fastcheck' ]]
266 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
267 JAVAOPTS="$JAVAOPTS -fastcheck"
273 elif [[ $1 = '-mainclass' ]]
275 JAVAOPTS="$JAVAOPTS -mainclass $2"
277 elif [[ $1 = '-selfloop' ]]
279 JAVAOPTS="$JAVAOPTS -selfloop $2"
281 elif [[ $1 = '-excprefetch' ]]
283 JAVAOPTS="$JAVAOPTS -excprefetch $2"
285 elif [[ $1 = '-arraypad' ]]
287 JAVAOPTS="$JAVAOPTS -arraypad"
288 elif [[ $1 = '-dsm' ]]
290 JAVAOPTS="$JAVAOPTS -dsm"
292 elif [[ $1 = '-fastmemcpy' ]]
295 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
296 elif [[ $1 = '-singleTM' ]]
298 JAVAOPTS="$JAVAOPTS -singleTM"
299 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
301 elif [[ $1 = '-stmarray' ]]
303 JAVAOPTS="$JAVAOPTS -stmarray"
304 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
306 elif [[ $1 = '-dualview' ]]
308 JAVAOPTS="$JAVAOPTS -dualview"
309 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
311 elif [[ $1 = '-readset' ]]
313 JAVAOPTS="$JAVAOPTS -readset"
314 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
315 elif [[ $1 = '-stmdebug' ]]
317 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
318 elif [[ $1 = '-stmstats' ]]
320 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
321 elif [[ $1 = '-stmlog' ]]
323 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
324 elif [[ $1 = '-prefetch' ]]
326 JAVAOPTS="$JAVAOPTS -prefetch"
327 elif [[ $1 = '-transstats' ]]
329 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
330 elif [[ $1 = '-printflat' ]]
332 JAVAOPTS="$JAVAOPTS -printflat"
333 elif [[ $1 = '-trueprob' ]]
335 JAVAOPTS="$JAVAOPTS -trueprob $2"
337 elif [[ $1 = '-inlineatomic' ]]
339 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
341 elif [[ $1 = '-mac' ]]
343 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
344 elif [[ $1 = '-profile' ]]
347 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
348 elif [[ $1 = '-gcprofile' ]]
351 elif [[ $1 = '-gcprofile_s' ]]
354 elif [[ $1 = '-accurateprofile' ]]
356 ACCURATEPROFILEFLAG=true
357 elif [[ $1 = '-profile_interrupt' ]]
359 PROFILEINTERRUPTFLAG=true
360 elif [[ $1 = '-useio' ]]
363 elif [[ $1 = '-taskstate' ]]
365 JAVAOPTS="$JAVAOPTS -taskstate"
366 elif [[ $1 = '-tagstate' ]]
368 JAVAOPTS="$JAVAOPTS -tagstate"
369 elif [[ $1 = '-scheduling' ]]
371 JAVAOPTS="$JAVAOPTS -scheduling"
372 elif [[ $1 = '-multicore' ]]
375 JAVAOPTS="$JAVAOPTS -multicore"
376 elif [[ $1 = '-numcore' ]]
378 JAVAOPTS="$JAVAOPTS -numcore $2"
379 if [[ "$2" -gt "1" ]]
381 TILERAN1COREFLAG=true
382 if [[ "$2" -eq "56" ]]
384 TILERA56COREFLAG=true
388 elif [[ $1 = '-numcore4gc' ]]
390 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
393 elif [[ $1 = '-raw' ]]
396 JAVAOPTS="$JAVAOPTS -raw"
397 elif [[ $1 = '-tilera_bme' ]]
401 elif [[ $1 = '-tilera_zlinux' ]]
404 TILERAZLINUXFLAG=true
405 elif [[ $1 = '-tilera_memprof' ]]
407 TILERAMEMPROFFLAG=true
408 elif [[ $1 = '-tileraconfig' ]]
412 elif [[ $1 = '-cacheflush' ]]
415 elif [[ $1 = '-rawconfig' ]]
419 elif [[ $1 = '-interrupt' ]]
422 elif [[ $1 = '-abcclose' ]]
424 JAVAOPTS="$JAVAOPTS -abcclose"
425 elif [[ $1 = '-optional' ]]
427 JAVAOPTS="$JAVAOPTS -optional"
429 elif [[ $1 = '-multicoregc' ]]
432 JAVAOPTS="$JAVAOPTS -multicoregc"
433 elif [[ $1 = '-gcmem_local' ]]
436 elif [[ $1 = '-gcmem_fixed' ]]
439 elif [[ $1 = '-gcmem_mixed' ]]
442 elif [[ $1 = '-gcmem_global' ]]
445 elif [[ $1 = '-gccache_local' ]]
447 GCCACHELOCALFLAG=true
448 elif [[ $1 = '-gccache_ran' ]]
451 elif [[ $1 = '-gccontroller_near' ]]
453 GCCONTROLLERNEARFLAG=true
454 elif [[ $1 = '-gccontroller_remote' ]]
456 GCCONTROLLERREMOTEFLAG=true
457 elif [[ $1 = '-gcsmallpagesize' ]]
459 GCSMALLPAGESIZEFLAG=true
460 elif [[ $1 = '-gcsmallpagesize2' ]]
462 GCSMALLPAGESIZEFLAG2=true
463 elif [[ $1 = '-gclargepagesize' ]]
465 GCLARGEPAGESIZEFLAG=true
466 elif [[ $1 = '-gclargesharedheap' ]]
468 GCLARGESHAREDHEAPFLAG=true
469 elif [[ $1 = '-gclargesharedheap2' ]]
471 GCLARGESHAREDHEAPFLAG2=true
472 elif [[ $1 = '-dmalloc' ]]
475 elif [[ $1 = '-recover' ]]
478 JAVAOPTS="$JAVAOPTS -task"
479 elif [[ $1 = '-useprofile' ]]
481 JAVAOPTS="$JAVAOPTS -useprofile $2"
483 elif [[ $1 = '-webinterface' ]]
485 JAVAOPTS="$JAVAOPTS -webinterface"
486 elif [[ $1 = '-instructionfailures' ]]
488 JAVAOPTS="$JAVAOPTS -instructionfailures"
489 elif [[ $1 = '-joptimize' ]]
491 JAVAOPTS="$JAVAOPTS -optimize"
492 elif [[ $1 = '-noloop' ]]
494 JAVAOPTS="$JAVAOPTS -noloop"
495 elif [[ $1 = '-dcopts' ]]
497 JAVAOPTS="$JAVAOPTS -dcopts"
498 elif [[ $1 = '-delaycomp' ]]
500 JAVAOPTS="$JAVAOPTS -delaycomp"
501 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
502 elif [[ $1 = '-hybrid' ]]
504 JAVAOPTS="$JAVAOPTS -hybrid"
505 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
506 elif [[ $1 = '-minimize' ]]
508 JAVAOPTS="$JAVAOPTS -minimize"
510 elif [[ $1 = '-ooojava' ]]
513 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
514 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
518 elif [[ $1 = '-heapsize-mb' ]]
520 EXTRAOPTIONS="$EXTRAOPTIONS -DINITIALHEAPSIZE_MB=($2)"
523 elif [[ $1 = '-rcr' ]]
525 JAVAOPTS="$JAVAOPTS -rcr"
527 EXTRAOPTIONS="$EXTRAOPTIONS -I$ROBUSTROOT/Runtime/oooJava"
530 elif [[ $1 = '-coreprof' ]]
533 JAVAOPTS="$JAVAOPTS -coreprof"
534 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
536 elif [[ $1 = '-coreprof-checkoverflow' ]]
538 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF_CHECKOVERFLOW"
540 elif [[ $1 = '-mlp' ]]
543 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
544 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
548 elif [[ $1 = '-mlpdebug' ]]
550 JAVAOPTS="$JAVAOPTS -mlpdebug"
552 elif [[ $1 = '-check' ]]
555 JAVAOPTS="$JAVAOPTS -conscheck"
556 elif [[ $1 = '-enable-assertions' ]]
558 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
559 elif [[ $1 = '-specdir' ]]
565 elif [[ $1 = '-debug' ]]
568 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
569 elif [[ $1 = '-rawpath' ]]
572 elif [[ $1 = '-runtimedebug' ]]
574 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
575 elif [[ $1 = '-dsmcaching' ]]
577 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
578 elif [[ $1 = '-rangeprefetch' ]]
580 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
581 elif [[ $1 = '-nooptimize' ]]
583 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
584 elif [[ $1 = '-optimize' ]]
586 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
587 elif [[ $1 = '-thread' ]]
589 JAVAOPTS="$JAVAOPTS -thread"
590 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
592 elif [[ $1 = '-recovery' ]]
594 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
596 elif [[ $1 = '-recoverystats' ]]
598 JAVAOPTS="$JAVAOPTS -recoverystats"
599 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
600 elif [[ $1 = '-distributioninfo' ]]
602 JAVAOPTS="$JAVAOPTS -distributioninfo"
603 elif [[ $1 = '-disall' ]]
605 JAVAOPTS="$JAVAOPTS -disall"
606 elif [[ $1 = '-disstart' ]]
608 JAVAOPTS="$JAVAOPTS -disstart $2"
610 elif [[ $1 = '-noc' ]]
613 elif [[ $1 = '-curdir' ]]
617 elif [[ $1 = '-outputdir' ]]
619 JAVAOPTS="$JAVAOPTS -outputdir $2"
622 SRCFILES="$SRCFILES $1"
627 BUILDDIR="$CURDIR/$tmpbuilddirectory"
635 if $CHECKFLAG #Generate structure files for repair tool
637 JAVAOPTS="$JAVAOPTS -struct structfile"
647 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
649 #base bristlecone files
650 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
656 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
659 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
662 #threading java stuff
663 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
666 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
669 # Build bristlecone/java sources
673 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
674 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
675 -dir $BUILDDIR $JAVAOPTS $SRCFILES
679 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
682 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
683 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
690 if $EXITAFTERANALYSIS
695 # Build all of the consistency specs
697 if $CHECKFLAG # CHECKFLAG
700 mkdir $BUILDDIR/specdir
701 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
703 echo > $BUILDDIR/specs
705 # compile specs into C code
706 for i in * # iterate over all directories
708 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
711 cat $BUILDDIR/structfile.struct $i.label > $i.struct
712 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
713 cp size.[c,h] $BUILDDIR/specdir
714 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
715 echo $i >> $BUILDDIR/specs
717 done # iterate over all directories
723 echo > $BUILDDIR/checkers.h
724 for i in `cat $BUILDDIR/specs`
726 gcc -O0 -g -fbounds-check -c $i\_aux.c
727 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
731 #build and link everything
736 MAKEFILE="Makefile.raw"
742 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
746 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
751 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
756 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
760 then # profile version
761 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
764 if $ACCURATEPROFILEFLAG
765 then # accurateprofile version
766 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
771 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
775 then #INTERRUPT version
776 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
777 fi #INTERRUPT version
781 MAKEFILE="$MAKEFILE.io"
782 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
784 MAKEFILE="$MAKEFILE.$RAWCONFIG"
787 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
792 cp ../Runtime/RAW/*.c ./
793 cp ../Runtime/RAW/*.h ./
794 cp ../Runtime/RAW/*.S ./
795 cp ../Runtime/RAW/*.s ./
796 cp ../$tmpbuilddirectory/*.c ./
797 cp ../$tmpbuilddirectory/*.h ./
803 TILERADIR="$CURDIR/tilera"
807 MAKEFILE="Makefile.tilera.$TILERACONFIG"
808 SIMHVC="sim.hvc.$TILERACONFIG"
809 PCIHVC="pci.hvc.$TILERACONFIG"
814 elif $TILERAZLINUXFLAG
815 then # TILERAZLINUXFLAG
816 TILERA_INDIR="ZLinux"
817 MAKEFILE="Makefile.tilera.$TILERACONFIG"
825 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
827 if $TILERAMEMPROFFLAG
828 then # not only with 1 core
829 PCIHVC="$PCIHVC.memprof"
830 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
835 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
836 elif $TILERAZLINUXFLAG
837 then # TILERAZLINUXFLAG
838 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
843 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
848 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
853 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
857 then # profile version
858 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
861 if $ACCURATEPROFILEFLAG
862 then # accurateprofile version
863 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
866 if $PROFILEINTERRUPTFLAG
867 then # profile_interrupt version
868 TILERACFLAGS="${TILERACFLAGS} -DPROFILE_INTERRUPT"
873 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
877 then #INTERRUPT version
878 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
879 fi #INTERRUPT version
882 then #MULTICOREGC version
883 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
887 then # GC_PROFILE version
888 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
892 then # GC_PROFILE_S version
893 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
897 then # SMEMLOCAL version
898 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
902 then # SMEMFIXED version
903 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
907 then # SMEMMIXED version
908 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
912 then # SMEMGLOBAL version
913 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
917 then # CACHE_LOCAL version
918 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
922 then # CACHE_RAN version
923 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
926 if $GCCONTROLLERNEARFLAG
927 then # CONTROLLER_NEAR version
928 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
931 if $GCCONTROLLERREMOTEFLAG
932 then # CONTROLLER_REMOTE version
933 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
936 if $GCSMALLPAGESIZEFLAG
937 then # GC_SMALLPAGESIZE version
938 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
941 if $GCLARGEPAGESIZEFLAG
942 then # GC_LARGEPAGESIZE version
943 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
946 if $GCLARGESHAREDHEAPFLAG
947 then # GC_LARGESHAREDHEAP version
948 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
951 if $GCSMALLPAGESIZEFLAG2
952 then # GC_SMALLPAGESIZE2 version
953 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
956 if $GCLARGESHAREDHEAPFLAG2
957 then # GC_LARGESHAREDHEAP2 version
958 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
962 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
965 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
966 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
969 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc.56 ./bamboo-vmlinux-pci.hvc.56
971 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
974 cp ../Runtime/multicoretask.c ./
975 cp ../Runtime/multicoreruntime.c ./
976 cp ../Runtime/Queue.c ./
977 cp ../Runtime/file.c ./
978 cp ../Runtime/math.c ./
979 cp ../Runtime/object.c ./
980 cp ../Runtime/GenericHashtable.c ./
981 cp ../Runtime/SimpleHash.c ./
982 cp ../Runtime/GCSharedHash.c ./
983 cp ../Runtime/ObjectHash.c ./
984 cp ../Runtime/socket.c ./
985 cp ../Runtime/mem.c ./
986 cp ../Runtime/multicoregarbage.c ./
987 cp ../Runtime/MGCHash.c ./
988 cp ../Runtime/GenericHashtable.h ./
989 cp ../Runtime/mem.h ./
990 cp ../Runtime/multicoreruntime.h ./
991 cp ../Runtime/object.h ./
992 cp ../Runtime/ObjectHash.h ./
993 cp ../Runtime/Queue.h ./
994 cp ../Runtime/runtime.h ./
995 cp ../Runtime/SimpleHash.h ./
996 cp ../Runtime/GCSharedHash.h ./
997 cp ../Runtime/multicoregc.h ./
998 cp ../Runtime/multicoregarbage.h ./
999 cp ../Runtime/multicorehelper.h ./
1000 cp ../Runtime/MGCHash.h ./
1001 cp ../Tilera/Runtime/*.c ./
1002 cp ../Tilera/Runtime/*.h ./
1003 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
1004 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
1005 if $TILERAZLINUXFLAG
1006 then # TILERAZLINUXFLAG
1007 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
1009 #if $TILERAMEMPROFFLAG
1010 #then # TILERAMEMPROFFLAG
1011 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
1013 cp ../Tilera/lib/* ./
1014 cp ../$tmpbuilddirectory/*.c ./
1015 cp ../$tmpbuilddirectory/*.h ./
1019 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
1022 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
1027 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
1029 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
1032 FILES="$RUNTIMEFILE \
1033 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1034 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1035 $ROBUSTROOT/Runtime/ObjectHash.c \
1036 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1037 $ROBUSTROOT/Runtime/math.c \
1038 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1042 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1047 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1052 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1059 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1060 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"
1062 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1063 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"
1069 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1070 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1077 FILES="$FILES $DSMRUNTIME/sandbox.c"
1079 FILES="$FILES $STMRUNTIME/sandbox.c"
1085 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1090 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1095 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1100 FILES="$FILES $tmpbuilddirectory/RuntimeConflictResolver.c $ROBUSTROOT/Runtime/oooJava/hashRCR.c $ROBUSTROOT/Runtime/oooJava/Queue_RCR.c"
1105 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1106 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1107 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1112 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1115 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1117 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1120 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1122 if $THREADSIMULATEFLAG
1124 # -lpthread for pthread functions, -lrt for message queue functions
1125 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1131 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1132 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1137 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1142 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1143 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1148 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1153 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1154 -c $tmpbuilddirectory/methods.c -lm
1159 gcc $INCLUDES $EXTRAOPTIONS \
1160 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1162 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1163 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin