#!/bin/bash printhelp() { echo STM Options echo -singleTM single machine committing transactions echo -stmdebug STM debug echo "-stmstats prints single machine commit (stm) statistics for the benchmark" echo -fastmemcpy use fast memcpy echo -sandbox sandbox transactions echo -dcopts conflict optimizations for transactional memory echo -transstats generates transaction stats on commits and aborts echo -inlineatomic depth inline methods inside of transactions to specified depth echo "-stmarray partial array treatment" echo echo DSM options echo -dsm distributed shared memory echo -abortreaders abort readers immediately echo -trueprob double - probabiltiy of true branch echo -dsmcaching -enable caching in dsm runtime echo echo Other options echo -robustroot set up the ROBUSTROOT to directory other than default one echo -readset turn on readset echo -mac distributed shared memory mac support echo -check generate check code echo -dmalloc link in dmalloc echo -64bit compile for 64 bit machine echo -32bit compile for 32 bit machine echo -joptimize java compiler optimizations echo -recover compile task code echo -fastcheck fast checkpointing for Bristlecone echo -specdir directory echo -printflat print out flat representation echo -selfloop task - this task cannot self loop forever echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)" echo -taskstate do task state analysis echo -tagstate do tag state analysis echo -scheduling do task scheduling echo -multicore generate multi-core version binary echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1" echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)" echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)" echo "-rawpath print out execute path information for raw version (should be used together with -raw)" echo "-useprofile use profiling data for scheduling (should be used together with -raw)" echo -printscheduling print out scheduling graphs echo -printschedulesim print out scheduling simulator result graphs echo -abcclose close the array boundary check echo "-tilera generate tilera version binary (should be used together with -multicore" echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)" echo "-raw generate raw version binary (should be used together with -multicore)" echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)" echo -threadsimulate generate multi-thread simulate version binary echo -multicoregc generate multi-core binary with garbage collection echo -optional enable optional echo -debug generate debug symbols echo -prefetch do prefetch analysis echo -garbagestats Print garbage collection statistics echo -webinterface enable web interface echo -runtimedebug printout runtime debug messages echo "-thread use support for multiple threads" echo "-optimize call gcc with -O9 (optimize)" echo "-nooptimize call gcc with -O0 (do not optimize)" echo -curdir directory echo -mainclass class with main method echo -o binary echo -nojava do not run bristlecone compiler echo -instructionfailures inject code for instructionfailures echo -profile build with profile options echo -accurateprofile build with accurate profile information including pre/post task processing info echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version" echo "-enable-assertions execute assert statements during compilation" echo -justanalyze exit after compiler analyses complete echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version" echo "-disall execute to collect whole distribution" echo "-disstart specify the start number of distribution information collection" echo -assembly generate assembly echo -help help } SANDBOX=false; ABORTREADERS=false; ROBUSTROOT=~/research/Robust/src DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/ STMRUNTIME=$ROBUSTROOT/Runtime/STM/ DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/ REPAIRROOT=~/research/Repair/RepairCompiler/ CURDIR=`pwd` DSMFLAG=false DSMRECOVERY=false FASTMEMCPY=false STMARRAY=false STM=false NOJAVA=false CHECKFLAG=false RECOVERFLAG=false MLP_ON=false MLPDEBUG=false MULTICOREFLAG=false RAWFLAG=false TILERAFLAG=false TILERACONFIG='' CACHEFLUSHFLAG=false RAWCONFIG='' DEBUGFLAG=false RAWPATHFLAG=false PROFILEFLAG=false ACCURATEPROFILEFLAG=false USEIOFLAG=false INTERRUPTFLAG=false THREADSIMULATEFLAG=false; MULTICOREGCFLAG=false; USEDMALLOC=false THREADFLAG=false FASTCHECK=false SPECDIR=`pwd` SRCFILES='' EXTRAOPTIONS='' MAINFILE='a' JAVAFORWARDOPTS='' JAVAOPTS='' OPTIONALFLAG=false EXITAFTERANALYSIS=false ASSEMBLY=false if [[ -z $1 ]] then printhelp exit fi while [[ -n $1 ]] do if [[ $1 = '-help' ]] then printhelp exit elif [[ $1 = '-justanalyze' ]] then EXITAFTERANALYSIS=true elif [[ $1 = '-assembly' ]] then ASSEMBLY=true elif [[ $1 = '-abortreaders' ]] then ABORTREADERS=true EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS" JAVAOPTS="$JAVAOPTS -abortreaders" elif [[ $1 = '-sandbox' ]] then SANDBOX=true EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX" JAVAOPTS="$JAVAOPTS -sandbox" elif [[ $1 = '-robustroot' ]] then ROBUSTROOT="$2" shift elif [[ $1 = '-nojava' ]] then NOJAVA=true elif [[ $1 = '-garbagestats' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS" elif [[ $1 = '-64bit' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64" elif [[ $1 = '-32bit' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -m32" elif [[ $1 = '-fastcheck' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK" JAVAOPTS="$JAVAOPTS -fastcheck" FASTCHECK=true elif [[ $1 = '-o' ]] then MAINFILE="$2" shift elif [[ $1 = '-mainclass' ]] then JAVAOPTS="$JAVAOPTS -mainclass $2" shift elif [[ $1 = '-selfloop' ]] then JAVAOPTS="$JAVAOPTS -selfloop $2" shift elif [[ $1 = '-excprefetch' ]] then JAVAOPTS="$JAVAOPTS -excprefetch $2" shift elif [[ $1 = '-arraypad' ]] then JAVAOPTS="$JAVAOPTS -arraypad" elif [[ $1 = '-dsm' ]] then JAVAOPTS="$JAVAOPTS -dsm" DSMFLAG=true elif [[ $1 = '-fastmemcpy' ]] then FASTMEMCPY=true EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY" elif [[ $1 = '-singleTM' ]] then JAVAOPTS="$JAVAOPTS -singleTM" EXTRAOPTIONS="$EXTRAOPTIONS -DSTM" STM=true elif [[ $1 = '-stmarray' ]] then JAVAOPTS="$JAVAOPTS -stmarray" EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY" STMARRAY=true elif [[ $1 = '-readset' ]] then JAVAOPTS="$JAVAOPTS -readset" EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET" elif [[ $1 = '-stmdebug' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG" elif [[ $1 = '-stmstats' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS" elif [[ $1 = '-stmlog' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG" elif [[ $1 = '-prefetch' ]] then JAVAOPTS="$JAVAOPTS -prefetch" elif [[ $1 = '-transstats' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS" elif [[ $1 = '-printflat' ]] then JAVAOPTS="$JAVAOPTS -printflat" elif [[ $1 = '-trueprob' ]] then JAVAOPTS="$JAVAOPTS -trueprob $2" shift elif [[ $1 = '-inlineatomic' ]] then JAVAOPTS="$JAVAOPTS -inlineatomic $2" shift elif [[ $1 = '-mac' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DMAC" elif [[ $1 = '-profile' ]] then PROFILEFLAG=true EXTRAOPTIONS="$EXTRAOPTIONS -pg" elif [[ $1 = '-accurateprofile' ]] then ACCURATEPROFILEFLAG=true elif [[ $1 = '-useio' ]] then USEIOFLAG=true elif [[ $1 = '-taskstate' ]] then JAVAOPTS="$JAVAOPTS -taskstate" elif [[ $1 = '-tagstate' ]] then JAVAOPTS="$JAVAOPTS -tagstate" elif [[ $1 = '-scheduling' ]] then JAVAOPTS="$JAVAOPTS -scheduling" elif [[ $1 = '-multicore' ]] then MULTICOREFLAG=true JAVAOPTS="$JAVAOPTS -multicore" elif [[ $1 = '-numcore' ]] then JAVAOPTS="$JAVAOPTS -numcore $2" shift elif [[ $1 = '-raw' ]] then RAWFLAG=true JAVAOPTS="$JAVAOPTS -raw" elif [[ $1 = '-tilera' ]] then TILERAFLAG=true elif [[ $1 = '-tileraconfig' ]] then TILERACONFIG="$2" shift elif [[ $1 = '-cacheflush' ]] then CACHEFLUSHFLAG=true elif [[ $1 = '-rawconfig' ]] then RAWCONFIG="$2" shift elif [[ $1 = '-interrupt' ]] then INTERRUPTFLAG=true elif [[ $1 = '-threadsimulate' ]] then THREADSIMULATEFLAG=true elif [[ $1 = '-abcclose' ]] then JAVAOPTS="$JAVAOPTS -abcclose" elif [[ $1 = '-optional' ]] then JAVAOPTS="$JAVAOPTS -optional" OPTIONALFLAG=true elif [[ $1 = '-multicoregc' ]] then MULTICOREGCFLAG=true JAVAOPTS="$JAVAOPTS -multicoregc" elif [[ $1 = '-dmalloc' ]] then USEDMALLOC=true elif [[ $1 = '-recover' ]] then RECOVERFLAG=true JAVAOPTS="$JAVAOPTS -task" elif [[ $1 = '-useprofile' ]] then JAVAOPTS="$JAVAOPTS -useprofile $2" shift elif [[ $1 = '-webinterface' ]] then JAVAOPTS="$JAVAOPTS -webinterface" elif [[ $1 = '-instructionfailures' ]] then JAVAOPTS="$JAVAOPTS -instructionfailures" elif [[ $1 = '-joptimize' ]] then JAVAOPTS="$JAVAOPTS -optimize" elif [[ $1 = '-dcopts' ]] then JAVAOPTS="$JAVAOPTS -dcopts" elif [[ $1 = '-delaycomp' ]] then JAVAOPTS="$JAVAOPTS -delaycomp" EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP" elif [[ $1 = '-minimize' ]] then JAVAOPTS="$JAVAOPTS -minimize" elif [[ $1 = '-mlp' ]] then MLP_ON=true EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread" JAVAOPTS="$JAVAOPTS -mlp $2 $3" shift shift elif [[ $1 = '-mlpdebug' ]] then JAVAOPTS="$JAVAOPTS -mlpdebug" elif [[ $1 = '-check' ]] then CHECKFLAG=true JAVAOPTS="$JAVAOPTS -conscheck" elif [[ $1 = '-enable-assertions' ]] then JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea" elif [[ $1 = '-specdir' ]] then cd $2 SPECDIR=`pwd` cd $CURDIR shift elif [[ $1 = '-debug' ]] then DEBUGFLAG=true EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic" elif [[ $1 = '-rawpath' ]] then RAWPATHFLAG=true elif [[ $1 = '-runtimedebug' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG" elif [[ $1 = '-dsmcaching' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE" elif [[ $1 = '-rangeprefetch' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH" elif [[ $1 = '-nooptimize' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -O0" elif [[ $1 = '-optimize' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -O9" elif [[ $1 = '-thread' ]] then JAVAOPTS="$JAVAOPTS -thread" EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread" THREADFLAG=true elif [[ $1 = '-recovery' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY" DSMRECOVERY=true elif [[ $1 = '-distributioninfo' ]] then JAVAOPTS="$JAVAOPTS -distributioninfo" elif [[ $1 = '-disall' ]] then JAVAOPTS="$JAVAOPTS -disall" elif [[ $1 = '-disstart' ]] then JAVAOPTS="$JAVAOPTS -disstart $2" shift elif [[ $1 = '-noc' ]] then CCOMPILEFLAG=false elif [[ $1 = '-curdir' ]] then CURDIR=$2 shift elif [[ $1 = '-outputdir' ]] then JAVAOPTS="$JAVAOPTS -outputdir $2" shift else SRCFILES="$SRCFILES $1" fi shift done BUILDDIR="$CURDIR/tmpbuilddirectory" cd $1 cd $CURDIR shift mkdir $BUILDDIR if $CHECKFLAG #Generate structure files for repair tool then JAVAOPTS="$JAVAOPTS -struct structfile" fi # Setup class path if $RECOVERFLAG then if $FASTCHECK then #fast transactions JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck" else #base bristlecone files JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone" fi else if $DSMFLAG then #dsm stuff JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM" elif $STM then JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM" elif $THREADFLAG then #threading java stuff JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread" fi #base java stuff JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java" fi # Build bristlecone/java sources if $MULTICOREFLAG then if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \ $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \ -dir $BUILDDIR $JAVAOPTS $SRCFILES then exit $? fi else #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \ if ! $NOJAVA then if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \ $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \ $JAVAOPTS $SRCFILES then exit $? fi fi fi if $EXITAFTERANALYSIS then exit fi # Build all of the consistency specs if $CHECKFLAG # CHECKFLAG then cd $SPECDIR mkdir $BUILDDIR/specdir cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir echo > $BUILDDIR/specs # compile specs into C code for i in * # iterate over all directories do if [[ "$i" != "CVS" ]] # CVSDIR CHECK then cd $SPECDIR/$i cat $BUILDDIR/structfile.struct $i.label > $i.struct java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i cp size.[c,h] $BUILDDIR/specdir cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir echo $i >> $BUILDDIR/specs fi # CVSDIR CHECK done # iterate over all directories #compile C code cd $BUILDDIR/specdir ./buildrobust echo > $BUILDDIR/checkers.h for i in `cat $BUILDDIR/specs` do gcc -O0 -g -fbounds-check -c $i\_aux.c echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h done fi # CHECKFLAG #build and link everything if $RAWFLAG then # RAWFLAG RAWDIR="$CURDIR/raw" MAKEFILE="Makefile.raw" mkdir $RAWDIR cd $RAWDIR make clean rm ./* export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW" if $CACHEFLUSHFLAG then # print path RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH" fi if $RAWPATHFLAG then # print path RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH" fi if $DEBUGFLAG then #debug version RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG" fi if $PROFILEFLAG then # profile version RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE" fi if $ACCURATEPROFILEFLAG then # accurateprofile version RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE" fi if $USEIOFLAG then # useio version RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO" fi if $INTERRUPTFLAG then #INTERRUPT version RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT" fi #INTERRUPT version if $USEIOFLAG then # useio version MAKEFILE="$MAKEFILE.io" echo "+++++++++++use Makefile.raw.io++++++++++++++++" else MAKEFILE="$MAKEFILE.$RAWCONFIG" fi #useio version cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile cp ../Runtime/*.c ./ cp ../Runtime/*.h ./ cp ../Runtime/*.S ./ cp ../Runtime/*.s ./ cp ../Runtime/RAW/*.c ./ cp ../Runtime/RAW/*.h ./ cp ../Runtime/RAW/*.S ./ cp ../Runtime/RAW/*.s ./ cp ../tmpbuilddirectory/*.c ./ cp ../tmpbuilddirectory/*.h ./ make elif $TILERAFLAG then # TILERAFLAG TILERADIR="$CURDIR/tilera" MAKEFILE="Makefile.tilera.$TILERACONFIG" SIMHVC="sim.hvc.$TILERACONFIG" PCIHVC="pci.hvc.$TILERACONFIG" mkdir $TILERADIR cd $TILERADIR make clean rm ./* export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT" if $CACHEFLUSHFLAG then # print path TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH" fi if $RAWPATHFLAG then # print path TILERACFLAGS="${TILERACFLAGS} -DRAWPATH" fi if $DEBUGFLAG then #debug version TILERACFLAGS="${TILERACFLAGS} -DDEBUG" fi if $PROFILEFLAG then # profile version TILERACFLAGS="${TILERACFLAGS} -DPROFILE" fi if $ACCURATEPROFILEFLAG then # accurateprofile version TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE" fi if $USEIOFLAG then # useio version TILERACFLAGS="${TILERACFLAGS} -DUSEIO" fi if $INTERRUPTFLAG then #INTERRUPT version TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT" fi #INTERRUPT version if $MULTICOREGCFLAG then #MULTICOREGC version TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC" fi cp $ROBUSTROOT/Tilera/Runtime/$MAKEFILE ./Makefile cp $ROBUSTROOT/Tilera/Runtime/$SIMHVC ./sim.hvc cp $ROBUSTROOT/Tilera/Runtime/$PCIHVC ./pci.hvc cp $ROBUSTROOT/Tilera/Runtime/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc cp ../Runtime/multicoretask.c ./ cp ../Runtime/multicoreruntime.c ./ cp ../Runtime/Queue.c ./ cp ../Runtime/file.c ./ cp ../Runtime/math.c ./ cp ../Runtime/object.c ./ cp ../Runtime/GenericHashtable.c ./ cp ../Runtime/SimpleHash.c ./ cp ../Runtime/ObjectHash.c ./ cp ../Runtime/socket.c ./ cp ../Runtime/mem.c ./ cp ../Runtime/multicoregarbage.c ./ cp ../Runtime/GenericHashtable.h ./ cp ../Runtime/mem.h ./ cp ../Runtime/multicoreruntime.h ./ cp ../Runtime/object.h ./ cp ../Runtime/ObjectHash.h ./ cp ../Runtime/Queue.h ./ cp ../Runtime/runtime.h ./ cp ../Runtime/SimpleHash.h ./ cp ../Runtime/multicoregc.h ./ cp ../Runtime/multicoregarbage.h ./ cp ../Runtime/multicorehelper.h ./ cp ../Tilera/Runtime/*.c ./ cp ../Tilera/Runtime/*.h ./ cp ../Tilera/lib/* ./ cp ../tmpbuilddirectory/*.c ./ cp ../tmpbuilddirectory/*.h ./ make else #!RAWFLAG && !TILERAFLAG cd $CURDIR INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \ -I$BUILDDIR" if $MULTICOREFLAG then RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c" else RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c" fi FILES="$RUNTIMEFILE \ $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \ $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \ $ROBUSTROOT/Runtime/ObjectHash.c \ $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \ $ROBUSTROOT/Runtime/math.c \ $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c" if $FASTMEMCPY then FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o" fi if $DSMFLAG then if $DSMRECOVERY then EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME" 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" else EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME" FILES="$FILES $DSMRUNTIME/trans.c $DSMRUNTIME/mcpileq.c $DSMRUNTIME/objstr.c $DSMRUNTIME/dstm.c $DSMRUNTIME/mlookup.c $DSMRUNTIME/clookup.c $DSMRUNTIME/llookup.c $DSMRUNTIME/threadnotify.c $DSMRUNTIME/dstmserver.c $DSMRUNTIME/plookup.c $DSMRUNTIME/ip.c $DSMRUNTIME/queue.c $DSMRUNTIME/prelookup.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" fi fi if $STM then EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME" FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c" fi if $SANDBOX then FILES="$FILES $STMRUNTIME/sandbox.c" fi if $ABORTREADERS then FILES="$FILES $DSMRUNTIME/abortreaders.c" fi if $FASTCHECK then FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c" fi if $MLP_ON then FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c" FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c" FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c" fi if $RECOVERFLAG then EXTRAOPTIONS="$EXTRAOPTIONS -DTASK" if $MULTICOREFLAG then EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE" fi FILES="$FILES tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c" if $RAWFLAG then EXTRAOPTIONS="$EXTRAOPTIONS -DRAW" fi if $THREADSIMULATEFLAG then # -lpthread for pthread functions, -lrt for message queue functions EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt" fi fi if $OPTIONALFLAG then EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL" FILES="$FILES tmpbuilddirectory/optionalarrays.c" fi if $THREADFLAG then FILES="$FILES $ROBUSTROOT/Runtime/thread.c" fi if $CHECKFLAG then EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o" INCLUDES="$INCLUDES -I$BUILDDIR/specdir" fi if $USEDMALLOC then EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC" fi if $ASSEMBLY then gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \ -c tmpbuilddirectory/methods.c -lm fi if $MULTICOREFLAG then gcc $INCLUDES $EXTRAOPTIONS \ tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin else gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \ tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin fi fi #!RAWFLAG exit