echo -trueprob double - probabiltiy of true branch
echo -dsmcaching -enable caching in dsm runtime
echo
+echo BAMBOO Multicore options
+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_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
+echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (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 -multicoregc generate multi-core binary with garbage collection
+echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
+echo -gcprofile build with gcprofile 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
echo Other options
echo -builddir setup different build directory
echo -robustroot set up the ROBUSTROOT to directory other than default one
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 "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
echo -optional enable optional
echo -debug generate debug symbols
echo -prefetch do prefetch analysis
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"
MULTICOREFLAG=false
RAWFLAG=false
TILERAFLAG=false
+TILERABMEFLAG=false
+TILERAZLINUXFLAG=false
TILERACONFIG=''
CACHEFLUSHFLAG=false
RAWCONFIG=''
DEBUGFLAG=false
RAWPATHFLAG=false
PROFILEFLAG=false
+GCPROFILEFLAG=false
ACCURATEPROFILEFLAG=false
USEIOFLAG=false
INTERRUPTFLAG=false
then
PROFILEFLAG=true
EXTRAOPTIONS="$EXTRAOPTIONS -pg"
+elif [[ $1 = '-gcprofile' ]]
+then
+GCPROFILEFLAG=true
elif [[ $1 = '-accurateprofile' ]]
then
ACCURATEPROFILEFLAG=true
elif [[ $1 = '-numcore' ]]
then
JAVAOPTS="$JAVAOPTS -numcore $2"
-GCCORES="GC_$2"
shift
elif [[ $1 = '-numcore4gc' ]]
then
JAVAOPTS="$JAVAOPTS -numcore4gc $2"
+GCCORES="GC_$2"
shift
elif [[ $1 = '-raw' ]]
then
RAWFLAG=true
JAVAOPTS="$JAVAOPTS -raw"
-elif [[ $1 = '-tilera' ]]
+elif [[ $1 = '-tilera_bme' ]]
then
TILERAFLAG=true
+TILERABMEFLAG=true
+elif [[ $1 = '-tilera_zlinux' ]]
+then
+TILERAFLAG=true
+TILERAZLINUXFLAG=true
elif [[ $1 = '-tileraconfig' ]]
then
TILERACONFIG="$2"
elif [[ $1 = '-interrupt' ]]
then
INTERRUPTFLAG=true
-elif [[ $1 = '-threadsimulate' ]]
-then
-THREADSIMULATEFLAG=true
elif [[ $1 = '-abcclose' ]]
then
JAVAOPTS="$JAVAOPTS -abcclose"
elif [[ $1 = '-mlp' ]]
then
MLP_ON=true
-EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread"
+EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
JAVAOPTS="$JAVAOPTS -mlp $2 $3"
shift
shift
elif $TILERAFLAG
then # TILERAFLAG
TILERADIR="$CURDIR/tilera"
+if $TILERABMEFLAG
+then # TILERABMEFLAG
+TILERA_INDIR="BME"
MAKEFILE="Makefile.tilera.$TILERACONFIG"
SIMHVC="sim.hvc.$TILERACONFIG"
PCIHVC="pci.hvc.$TILERACONFIG"
+elif $TILERAZLINUXFLAG
+then # TILERAZLINUXFLAG
+TILERA_INDIR="ZLinux"
+MAKEFILE="Makefile.tilera.$TILERACONFIG"
+fi
mkdir $TILERADIR
cd $TILERADIR
make clean
export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
+if $TILERABMEFLAG
+then # TILERABMEFLAG
+TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
+elif $TILERAZLINUXFLAG
+then # TILERAZLINUXFLAG
+TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
+fi
+
if $CACHEFLUSHFLAG
then # print path
TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
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
+if $GCPROFILEFLAG
+then # GC_PROFILE version
+TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
+fi
+
+cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
+if $TILERABMEFLAG
+then # TILERABMEFLAG
+cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
+cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
+cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
+fi
cp ../Runtime/multicoretask.c ./
cp ../Runtime/multicoreruntime.c ./
cp ../Runtime/Queue.c ./
cp ../Runtime/socket.c ./
cp ../Runtime/mem.c ./
cp ../Runtime/multicoregarbage.c ./
+cp ../Runtime/MGCHash.c ./
cp ../Runtime/GenericHashtable.h ./
cp ../Runtime/mem.h ./
cp ../Runtime/multicoreruntime.h ./
cp ../Runtime/multicoregc.h ./
cp ../Runtime/multicoregarbage.h ./
cp ../Runtime/multicorehelper.h ./
+cp ../Runtime/MGCHash.h ./
cp ../Tilera/Runtime/*.c ./
cp ../Tilera/Runtime/*.h ./
+cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
+cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
+if $TILERAZLINUXFLAG
+then # TILERAZLINUXFLAG
+cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
+fi
cp ../Tilera/lib/* ./
cp ../$tmpbuilddirectory/*.c ./
cp ../$tmpbuilddirectory/*.h ./
make
-else #!RAWFLAG && !TILERAFLAG
+else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
cd $CURDIR
INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
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"
+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/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 $DSMRECOVERYRUNTIME/translist.c $DSMRECOVERYRUNTIME/paxos.c"
else
EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
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"
fi
fi
+
if $STM
then
EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
if $SANDBOX
then
+if $DSMFLAG
+then
+FILES="$FILES $DSMRUNTIME/sandbox.c"
+else
FILES="$FILES $STMRUNTIME/sandbox.c"
fi
+fi
if $ABORTREADERS
then