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
26 echo -builddir setup different build directory
27 echo -robustroot set up the ROBUSTROOT to directory other than default one
28 echo -readset turn on readset
29 echo -mac distributed shared memory mac support
30 echo -check generate check code
31 echo -dmalloc link in dmalloc
32 echo -64bit compile for 64 bit machine
33 echo -32bit compile for 32 bit machine
34 echo -joptimize java compiler optimizations
35 echo -recover compile task code
36 echo -fastcheck fast checkpointing for Bristlecone
37 echo -specdir directory
38 echo -printflat print out flat representation
39 echo -selfloop task - this task cannot self loop forever
40 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
41 echo -taskstate do task state analysis
42 echo -tagstate do tag state analysis
43 echo -scheduling do task scheduling
44 echo -multicore generate multi-core version binary
45 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
46 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
47 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
48 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
49 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
50 echo -printscheduling print out scheduling graphs
51 echo -printschedulesim print out scheduling simulator result graphs
52 echo -abcclose close the array boundary check
53 echo "-tilera generate tilera version binary (should be used together with -multicore"
54 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
55 echo "-raw generate raw version binary (should be used together with -multicore)"
56 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
57 echo -threadsimulate generate multi-thread simulate version binary
58 echo -multicoregc generate multi-core binary with garbage collection
59 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
60 echo -optional enable optional
61 echo -debug generate debug symbols
62 echo -prefetch do prefetch analysis
63 echo -garbagestats Print garbage collection statistics
64 echo -webinterface enable web interface
65 echo -runtimedebug printout runtime debug messages
66 echo "-thread use support for multiple threads"
67 echo "-optimize call gcc with -O9 (optimize)"
68 echo "-nooptimize call gcc with -O0 (do not optimize)"
69 echo -curdir directory
70 echo -mainclass class with main method
72 echo -nojava do not run bristlecone compiler
73 echo -instructionfailures inject code for instructionfailures
74 echo -profile build with profile options
75 echo -gcprofile build with gcprofile options
76 echo -accurateprofile build with accurate profile information including pre/post task processing info
77 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
78 echo "-enable-assertions execute assert statements during compilation"
79 echo -justanalyze exit after compiler analyses complete
80 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
81 echo "-disall execute to collect whole distribution"
82 echo "-disstart specify the start number of distribution information collection"
83 echo -assembly generate assembly
84 echo -recovery compile recovery code
85 echo -dsmtask support work and task class library
86 echo -recoverystats print out recovery record
90 tmpbuilddirectory="tmpbuilddirectory"
94 ROBUSTROOT=~/research/Robust/src
95 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
96 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
97 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
98 REPAIRROOT=~/research/Repair/RepairCompiler/
122 ACCURATEPROFILEFLAG=false
125 THREADSIMULATEFLAG=false;
126 MULTICOREGCFLAG=false;
137 EXITAFTERANALYSIS=false
149 if [[ $1 = '-help' ]]
153 elif [[ $1 = '-justanalyze' ]]
155 EXITAFTERANALYSIS=true
156 elif [[ $1 = '-assembly' ]]
159 elif [[ $1 = '-abortreaders' ]]
162 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
163 JAVAOPTS="$JAVAOPTS -abortreaders"
164 elif [[ $1 = '-sandbox' ]]
167 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
168 JAVAOPTS="$JAVAOPTS -sandbox"
169 elif [[ $1 = '-numa' ]]
171 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
173 elif [[ $1 = '-robustroot' ]]
177 elif [[ $1 = '-builddir' ]]
179 tmpbuilddirectory="$2"
181 elif [[ $1 = '-nojava' ]]
184 elif [[ $1 = '-eventmonitor' ]]
186 JAVAOPTS="$JAVAOPTS -eventmonitor"
188 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
189 elif [[ $1 = '-garbagestats' ]]
191 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
192 elif [[ $1 = '-64bit' ]]
194 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
195 elif [[ $1 = '-32bit' ]]
197 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
198 elif [[ $1 = '-fastcheck' ]]
200 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
201 JAVAOPTS="$JAVAOPTS -fastcheck"
207 elif [[ $1 = '-mainclass' ]]
209 JAVAOPTS="$JAVAOPTS -mainclass $2"
211 elif [[ $1 = '-selfloop' ]]
213 JAVAOPTS="$JAVAOPTS -selfloop $2"
215 elif [[ $1 = '-excprefetch' ]]
217 JAVAOPTS="$JAVAOPTS -excprefetch $2"
219 elif [[ $1 = '-arraypad' ]]
221 JAVAOPTS="$JAVAOPTS -arraypad"
222 elif [[ $1 = '-dsm' ]]
224 JAVAOPTS="$JAVAOPTS -dsm"
226 elif [[ $1 = '-fastmemcpy' ]]
229 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
230 elif [[ $1 = '-singleTM' ]]
232 JAVAOPTS="$JAVAOPTS -singleTM"
233 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
235 elif [[ $1 = '-stmarray' ]]
237 JAVAOPTS="$JAVAOPTS -stmarray"
238 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
240 elif [[ $1 = '-dualview' ]]
242 JAVAOPTS="$JAVAOPTS -dualview"
243 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
245 elif [[ $1 = '-readset' ]]
247 JAVAOPTS="$JAVAOPTS -readset"
248 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
249 elif [[ $1 = '-stmdebug' ]]
251 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
252 elif [[ $1 = '-stmstats' ]]
254 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
255 elif [[ $1 = '-stmlog' ]]
257 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
258 elif [[ $1 = '-prefetch' ]]
260 JAVAOPTS="$JAVAOPTS -prefetch"
261 elif [[ $1 = '-transstats' ]]
263 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
264 elif [[ $1 = '-printflat' ]]
266 JAVAOPTS="$JAVAOPTS -printflat"
267 elif [[ $1 = '-trueprob' ]]
269 JAVAOPTS="$JAVAOPTS -trueprob $2"
271 elif [[ $1 = '-inlineatomic' ]]
273 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
275 elif [[ $1 = '-mac' ]]
277 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
278 elif [[ $1 = '-profile' ]]
281 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
282 elif [[ $1 = '-gcprofile' ]]
285 elif [[ $1 = '-accurateprofile' ]]
287 ACCURATEPROFILEFLAG=true
288 elif [[ $1 = '-useio' ]]
291 elif [[ $1 = '-taskstate' ]]
293 JAVAOPTS="$JAVAOPTS -taskstate"
294 elif [[ $1 = '-tagstate' ]]
296 JAVAOPTS="$JAVAOPTS -tagstate"
297 elif [[ $1 = '-scheduling' ]]
299 JAVAOPTS="$JAVAOPTS -scheduling"
300 elif [[ $1 = '-multicore' ]]
303 JAVAOPTS="$JAVAOPTS -multicore"
304 elif [[ $1 = '-numcore' ]]
306 JAVAOPTS="$JAVAOPTS -numcore $2"
308 elif [[ $1 = '-numcore4gc' ]]
310 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
313 elif [[ $1 = '-raw' ]]
316 JAVAOPTS="$JAVAOPTS -raw"
317 elif [[ $1 = '-tilera' ]]
320 elif [[ $1 = '-tileraconfig' ]]
324 elif [[ $1 = '-cacheflush' ]]
327 elif [[ $1 = '-rawconfig' ]]
331 elif [[ $1 = '-interrupt' ]]
334 elif [[ $1 = '-threadsimulate' ]]
336 THREADSIMULATEFLAG=true
337 elif [[ $1 = '-abcclose' ]]
339 JAVAOPTS="$JAVAOPTS -abcclose"
340 elif [[ $1 = '-optional' ]]
342 JAVAOPTS="$JAVAOPTS -optional"
344 elif [[ $1 = '-multicoregc' ]]
347 JAVAOPTS="$JAVAOPTS -multicoregc"
348 elif [[ $1 = '-dmalloc' ]]
351 elif [[ $1 = '-recover' ]]
354 JAVAOPTS="$JAVAOPTS -task"
355 elif [[ $1 = '-useprofile' ]]
357 JAVAOPTS="$JAVAOPTS -useprofile $2"
359 elif [[ $1 = '-webinterface' ]]
361 JAVAOPTS="$JAVAOPTS -webinterface"
362 elif [[ $1 = '-instructionfailures' ]]
364 JAVAOPTS="$JAVAOPTS -instructionfailures"
365 elif [[ $1 = '-joptimize' ]]
367 JAVAOPTS="$JAVAOPTS -optimize"
368 elif [[ $1 = '-dcopts' ]]
370 JAVAOPTS="$JAVAOPTS -dcopts"
371 elif [[ $1 = '-delaycomp' ]]
373 JAVAOPTS="$JAVAOPTS -delaycomp"
374 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
375 elif [[ $1 = '-hybrid' ]]
377 JAVAOPTS="$JAVAOPTS -hybrid"
378 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
379 elif [[ $1 = '-minimize' ]]
381 JAVAOPTS="$JAVAOPTS -minimize"
383 elif [[ $1 = '-mlp' ]]
386 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
387 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
391 elif [[ $1 = '-mlpdebug' ]]
393 JAVAOPTS="$JAVAOPTS -mlpdebug"
395 elif [[ $1 = '-check' ]]
398 JAVAOPTS="$JAVAOPTS -conscheck"
399 elif [[ $1 = '-enable-assertions' ]]
401 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
402 elif [[ $1 = '-specdir' ]]
408 elif [[ $1 = '-debug' ]]
411 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
412 elif [[ $1 = '-rawpath' ]]
415 elif [[ $1 = '-runtimedebug' ]]
417 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
418 elif [[ $1 = '-dsmcaching' ]]
420 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
421 elif [[ $1 = '-rangeprefetch' ]]
423 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
424 elif [[ $1 = '-nooptimize' ]]
426 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
427 elif [[ $1 = '-optimize' ]]
429 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
430 elif [[ $1 = '-thread' ]]
432 JAVAOPTS="$JAVAOPTS -thread"
433 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
435 elif [[ $1 = '-recovery' ]]
437 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
439 elif [[ $1 = '-recoverystats' ]]
441 JAVAOPTS="$JAVAOPTS -recoverystats"
442 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
443 elif [[ $1 = '-distributioninfo' ]]
445 JAVAOPTS="$JAVAOPTS -distributioninfo"
446 elif [[ $1 = '-disall' ]]
448 JAVAOPTS="$JAVAOPTS -disall"
449 elif [[ $1 = '-disstart' ]]
451 JAVAOPTS="$JAVAOPTS -disstart $2"
453 elif [[ $1 = '-noc' ]]
456 elif [[ $1 = '-curdir' ]]
460 elif [[ $1 = '-outputdir' ]]
462 JAVAOPTS="$JAVAOPTS -outputdir $2"
465 SRCFILES="$SRCFILES $1"
470 BUILDDIR="$CURDIR/$tmpbuilddirectory"
478 if $CHECKFLAG #Generate structure files for repair tool
480 JAVAOPTS="$JAVAOPTS -struct structfile"
490 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
492 #base bristlecone files
493 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
499 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
502 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
505 #threading java stuff
506 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
509 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
512 # Build bristlecone/java sources
516 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
517 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
518 -dir $BUILDDIR $JAVAOPTS $SRCFILES
522 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
525 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
526 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
533 if $EXITAFTERANALYSIS
538 # Build all of the consistency specs
540 if $CHECKFLAG # CHECKFLAG
543 mkdir $BUILDDIR/specdir
544 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
546 echo > $BUILDDIR/specs
548 # compile specs into C code
549 for i in * # iterate over all directories
551 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
554 cat $BUILDDIR/structfile.struct $i.label > $i.struct
555 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
556 cp size.[c,h] $BUILDDIR/specdir
557 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
558 echo $i >> $BUILDDIR/specs
560 done # iterate over all directories
566 echo > $BUILDDIR/checkers.h
567 for i in `cat $BUILDDIR/specs`
569 gcc -O0 -g -fbounds-check -c $i\_aux.c
570 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
574 #build and link everything
579 MAKEFILE="Makefile.raw"
585 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
589 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
594 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
599 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
603 then # profile version
604 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
607 if $ACCURATEPROFILEFLAG
608 then # accurateprofile version
609 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
614 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
618 then #INTERRUPT version
619 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
620 fi #INTERRUPT version
624 MAKEFILE="$MAKEFILE.io"
625 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
627 MAKEFILE="$MAKEFILE.$RAWCONFIG"
630 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
635 cp ../Runtime/RAW/*.c ./
636 cp ../Runtime/RAW/*.h ./
637 cp ../Runtime/RAW/*.S ./
638 cp ../Runtime/RAW/*.s ./
639 cp ../$tmpbuilddirectory/*.c ./
640 cp ../$tmpbuilddirectory/*.h ./
646 TILERADIR="$CURDIR/tilera"
647 MAKEFILE="Makefile.tilera.$TILERACONFIG"
648 SIMHVC="sim.hvc.$TILERACONFIG"
649 PCIHVC="pci.hvc.$TILERACONFIG"
655 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
659 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
664 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
669 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
673 then # profile version
674 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
677 if $ACCURATEPROFILEFLAG
678 then # accurateprofile version
679 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
684 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
688 then #INTERRUPT version
689 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
690 fi #INTERRUPT version
693 then #MULTICOREGC version
694 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
698 then # GC_PROFILE version
699 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
702 cp $ROBUSTROOT/Tilera/Runtime/$MAKEFILE ./Makefile
703 cp $ROBUSTROOT/Tilera/Runtime/$SIMHVC ./sim.hvc
704 cp $ROBUSTROOT/Tilera/Runtime/$PCIHVC ./pci.hvc
705 cp $ROBUSTROOT/Tilera/Runtime/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
706 cp ../Runtime/multicoretask.c ./
707 cp ../Runtime/multicoreruntime.c ./
708 cp ../Runtime/Queue.c ./
709 cp ../Runtime/file.c ./
710 cp ../Runtime/math.c ./
711 cp ../Runtime/object.c ./
712 cp ../Runtime/GenericHashtable.c ./
713 cp ../Runtime/SimpleHash.c ./
714 cp ../Runtime/ObjectHash.c ./
715 cp ../Runtime/socket.c ./
716 cp ../Runtime/mem.c ./
717 cp ../Runtime/multicoregarbage.c ./
718 cp ../Runtime/MGCHash.c ./
719 cp ../Runtime/GenericHashtable.h ./
720 cp ../Runtime/mem.h ./
721 cp ../Runtime/multicoreruntime.h ./
722 cp ../Runtime/object.h ./
723 cp ../Runtime/ObjectHash.h ./
724 cp ../Runtime/Queue.h ./
725 cp ../Runtime/runtime.h ./
726 cp ../Runtime/SimpleHash.h ./
727 cp ../Runtime/multicoregc.h ./
728 cp ../Runtime/multicoregarbage.h ./
729 cp ../Runtime/multicorehelper.h ./
730 cp ../Runtime/MGCHash.h ./
731 cp ../Tilera/Runtime/*.c ./
732 cp ../Tilera/Runtime/*.h ./
733 cp ../Tilera/lib/* ./
734 cp ../$tmpbuilddirectory/*.c ./
735 cp ../$tmpbuilddirectory/*.h ./
739 else #!RAWFLAG && !TILERAFLAG
742 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
747 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
749 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
752 FILES="$RUNTIMEFILE \
753 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
754 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
755 $ROBUSTROOT/Runtime/ObjectHash.c \
756 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
757 $ROBUSTROOT/Runtime/math.c \
758 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
762 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
767 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
772 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
779 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
780 FILES="$FILES $DSMRECOVERYRUNTIME/trans.c $DSMRECOVERYRUNTIME/mcpileq.c $DSMRECOVERYRUNTIME/objstr.c $DSMRECOVERYRUNTIME/dstm.c $DSMRECOVERYRUNTIME/mlookup.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/prelookup.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"
782 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
783 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"
789 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
790 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
797 FILES="$FILES $DSMRUNTIME/sandbox.c"
799 FILES="$FILES $STMRUNTIME/sandbox.c"
805 FILES="$FILES $DSMRUNTIME/abortreaders.c"
810 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
815 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
816 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
817 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
822 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
825 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
827 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
830 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
832 if $THREADSIMULATEFLAG
834 # -lpthread for pthread functions, -lrt for message queue functions
835 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
841 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
842 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
847 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
852 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
853 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
858 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
863 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
864 -c $tmpbuilddirectory/methods.c -lm
869 gcc $INCLUDES $EXTRAOPTIONS \
870 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
872 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
873 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin