X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Robust%2Fsrc%2Fbuildscript;h=7abaee6349e5fb081c4fee314ded71540b6bfe98;hb=073c54e79f6e530f6286f018df41a19980b04ae1;hp=2dcfb399eedbb8ef08299fffa9b8c37be281f3c1;hpb=fe09c58ef980a1594c88df98c801e09733a30af6;p=IRC.git diff --git a/Robust/src/buildscript b/Robust/src/buildscript index 2dcfb399..7abaee63 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -1,33 +1,138 @@ #!/bin/bash printhelp() { -echo -robustroot set up the ROBUSTROOT to directory other than default one +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 "-dualview dual view of arrays" +echo "-hybrid use fission only when it looks like a good choice" +echo "-numa numa aware" +echo "-eventmonitor turn on transaction event trace recording" +echo +echo OOOJava options +echo -coreprof, turn on profiling API +echo -coreprof-eventwords NUM, space in words/thread for coreprof events +echo -coreprof-checkoverflow, ONLY use for debugging event overflow +echo -coreprof-enable EVENTNAME, only enable desired events to reduce overhead +echo EVENTNAME can be: cpe_main, cpe_runmalloc, cpe_runfree, cpe_poolalloc, cpe_count_poolalloc, cpe_count_poolreuse, cpe_workschedgrab, cpe_taskdispatch, cpe_preparememq, cpe_taskexecute, cpe_taskretire, cpe_taskstallvar, cpe_taskstallmem +echo "-ooojava " +echo -ooodebug general OOOJava debugging messages +echo -ooodebug-disable-task-mem-pool this is a tricky module, disable for simpler runtime +echo -mempool-detect-misuse turn on to find code misusing pool-allocated records +echo -rcr turn on runtime conflict resolver +echo -rcr_debug Shows weakly connected heaproots and which allocation sites were considered for traversal +echo -rcr_debug_verbose in addition to above, also prints out effects passed in, internal representation of effects, and internal representation of reach graph +echo -squeue use single queue +echo -corepin use core pinning +echo -nostalltr turn off RCR traversers that only handle conflicts between task and stallsite +echo -nolock turn off synchronization lock +echo +echo Disjoint Reachability Analysis options +echo -disjoint enable analysis +echo -disjoint-k set k-limit for heap nodes per allocation site +echo "-disjoint-write-dots write reach graphs for all method sols. or only final sols." +echo -disjoint-write-initial-contexts write reach graphs for callee initial contexts from all call sites +echo -disjoint-write-ihms write reach graphs for each call site\'s Initial Heap Model +echo "-disjoint-alias-file write sharing for normal human reading or LaTeX tabbed" +echo "-disjoint-debug-callsite " +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" +echo "-disjoint-debug-snap-method " +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" +echo "-disjoint-dvisit-stack use stack strat to visit descriptors (tasks or methods)" +echo -disjoint-dvisit-stack-callees-on-top alternate stack strat +echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors +echo -disjoint-desire-determinism set above interproc for determinism +echo -disjoint-debug-scheduling debug when methods are scheduled for analysis +echo +echo -pointsto-check-v-runtime check allocation site of pointer targets at runtime to help verify heap analysis results +echo +echo "-mlp build mlp code" +echo -mlpdebug if mlp, report progress and interim results +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 BAMBOO Multicore options +echo -scheduling do task scheduling +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 -multicore generate multi-core version binary +echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1" +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 "-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 "-tilera_memprof build the memprof version (should be used together with -tilera_xx) " +echo -accurateprofile build with accurate profile information including pre/post task processing info +echo -profile_interrupt build with profile information of interrupts +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 Multicore GC options +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 "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)" +echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)" +echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)" +echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)" +echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)" +echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)" +echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)" +echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)" +echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)" +echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)" +echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)" +echo "-gccacheadapt setup as cacheadaptable mode (should be used together with -multicoregc)" +echo -gcprofile build with gcprofile options +echo -mgc generate Multicore GC binary without task stuff +echo -objectlockdebug generate OBJECT_LOCK_DEBUG code +echo -gctbldebug generate GC_TBL_DEBUG code +echo +echo SSJava options +echo -ssjava enables SSJava +echo +echo Other options +echo -jni enable jni +echo -abcclose turnoff array boundary checks +echo -builddir setup different build directory +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 -noloop turnoff loop 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 "-raw generate raw version binary (should be used together with -multicore)" -echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)" -echo "-rawconfig config raw simulator as 4xn (should be used together 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 -threadsimulate generate multi-thread simulate version binary echo -optional enable optional echo -debug generate debug symbols echo -prefetch do prefetch analysis -echo -transstats generates transaction stats on commits and aborts +echo -heapsize-mb NUM set initial heap size in MB, default is 256 +echo -garbagestats Print garbage collection statistics echo -webinterface enable web interface echo -runtimedebug printout runtime debug messages echo "-thread use support for multiple threads" @@ -39,31 +144,93 @@ echo -o binary echo -nojava do not run bristlecone compiler echo -instructionfailures inject code for instructionfailures echo -profile build with profile options -echo "-rawuseio 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 -assembly generate assembly +echo -recovery compile recovery code +echo -dsmtask support work and task class library +echo -recoverystats print out recovery record +echo -src-after-pp prints source code after preprocessor to tmp.c +echo -capture-null-dereferences generates code to warn before derefencing null +echo -printlinenum print out line numbers in generated C codes echo -help help } +tmpbuilddirectory="tmpbuilddirectory" +JNI=false +SSJAVA=false +SRCAFTERPP=false; +COREPROF=false; +NUMA=false; +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` +SQUEUE=false DSMFLAG=false +DSMRECOVERY=false +FASTMEMCPY=false +STMARRAY=false +DUALVIEW=false +STM=false +EVENTMONITOR=false NOJAVA=false CHECKFLAG=false RECOVERFLAG=false +MLP_ON=false +RCR=false +RCR_DEBUG=false +RCR_DEBUG_VERBOSE=false +MLPDEBUG=false MULTICOREFLAG=false -TRANSSTATSFLAG=false RAWFLAG=false +TILERAFLAG=false +TILERABMEFLAG=false +TILERAZLINUXFLAG=false +TILERAMEMPROFFLAG=false +TILERACONFIG='' +TILERACORES='' RAWCONFIG='' -RAWDEBUGFLAG=false +DEBUGFLAG=false RAWPATHFLAG=false -RAWPROFILEFLAG=false -RAWUSEIOFLAG=false +PROFILEFLAG=false +GCPROFILEFLAG=false +GCPROFILESFLAG=false +ACCURATEPROFILEFLAG=false +PROFILEINTERRUPTFLAG=false +USEIOFLAG=false INTERRUPTFLAG=false THREADSIMULATEFLAG=false; +MULTICOREGCFLAG=false; +GCMEMLOCALFLAG=false; +GCMEMFIXEDFLAG=false; +GCMEMMIXEDFLAG=false; +GCMEMGLOBALFLAG=false; +GCCACHELOCALFLAG=false; +GCCACHERANFLAG=false; +GCCONTROLLERNEARFLAG=false; +GCCONTROLLERREMOTEFLAG=false; +GCSMALLPAGESIZEFLAG=false; +GCLARGEPAGESIZEFLAG=false; +GCLARGEPAGESIZE2FLAG=false; +GCLARGESHAREDHEAPFLAG=false; +GCSMALLPAGESIZEFLAG2=false; +GCLARGESHAREDHEAPFLAG2=false; +GCCACHEADAPTFLAG=false +GCCACHEADAPTPOLICYFLAG=false +GCCACHEADAPTPOLICY='' +GCCACHESAMPLINGFLAG=false +MGCFLAG=false +MGCINTELFLAG=false +OBJECTLOCKDEBUGFLAG=false +GCTBLDEBUGFLAG=false USEDMALLOC=false THREADFLAG=false +FASTCHECK=false SPECDIR=`pwd` SRCFILES='' EXTRAOPTIONS='' @@ -71,6 +238,11 @@ MAINFILE='a' JAVAFORWARDOPTS='' JAVAOPTS='' OPTIONALFLAG=false +EXITAFTERANALYSIS=false +ASSEMBLY=false +GCCORES='' +TILERAN1COREFLAG=false +TILERA56COREFLAG=false if [[ -z $1 ]] then @@ -84,13 +256,68 @@ if [[ $1 = '-help' ]] then printhelp exit +elif [[ $1 = '-jni' ]] +then +JNI=true +JAVAOPTS="$JAVAOPTS -jni" +EXTRAOPTIONS="$EXTRAOPTIONS -DJNI -I$ROBUSTROOT/Runtime/jni" +elif [[ $1 = '-justanalyze' ]] +then +EXITAFTERANALYSIS=true +elif [[ $1 = '-capture-null-dereferences' ]] +then +JAVAOPTS="$JAVAOPTS -capture-null-dereferences" +EXTRAOPTIONS="$EXTRAOPTIONS -DCAPTURE_NULL_DEREFERENCES" +elif [[ $1 = '-src-after-pp' ]] +then +SRCAFTERPP=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 = '-numa' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE" +NUMA=true elif [[ $1 = '-robustroot' ]] then ROBUSTROOT="$2" shift +elif [[ $1 = '-builddir' ]] +then +tmpbuilddirectory="$2" +shift elif [[ $1 = '-nojava' ]] then NOJAVA=true +elif [[ $1 = '-eventmonitor' ]] +then +JAVAOPTS="$JAVAOPTS -eventmonitor" +EVENTMONITOR=true +EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR" +elif [[ $1 = '-garbagestats' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS" +elif [[ $1 = '-64bit' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64" +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" @@ -107,16 +334,51 @@ 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 = '-dualview' ]] +then +JAVAOPTS="$JAVAOPTS -dualview" +EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW" +DUALVIEW=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 -TRANSSTATSFLAG=true +EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS" elif [[ $1 = '-printflat' ]] then JAVAOPTS="$JAVAOPTS -printflat" @@ -124,16 +386,39 @@ 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 = '-squeue' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DSQUEUE" +elif [[ $1 = '-corepin' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPIN" +SQUEUE=true elif [[ $1 = '-profile' ]] then -RAWPROFILEFLAG=true +PROFILEFLAG=true EXTRAOPTIONS="$EXTRAOPTIONS -pg" -elif [[ $1 = '-rawuseio' ]] +elif [[ $1 = '-gcprofile' ]] then -RAWUSEIOFLAG=true +GCPROFILEFLAG=true +elif [[ $1 = '-gcprofile_s' ]] +then +GCPROFILESFLAG=true +elif [[ $1 = '-accurateprofile' ]] +then +ACCURATEPROFILEFLAG=true +elif [[ $1 = '-profile_interrupt' ]] +then +PROFILEINTERRUPTFLAG=true +elif [[ $1 = '-useio' ]] +then +USEIOFLAG=true elif [[ $1 = '-taskstate' ]] then JAVAOPTS="$JAVAOPTS -taskstate" @@ -150,11 +435,40 @@ JAVAOPTS="$JAVAOPTS -multicore" elif [[ $1 = '-numcore' ]] then JAVAOPTS="$JAVAOPTS -numcore $2" +TILERACORES="$2" +if [[ "$2" -gt "1" ]] +then +TILERAN1COREFLAG=true +if [[ "$2" -eq "56" ]] +then +TILERA56COREFLAG=true +fi +fi +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_bme' ]] +then +TILERAFLAG=true +TILERABMEFLAG=true +elif [[ $1 = '-tilera_zlinux' ]] +then +TILERAFLAG=true +TILERAZLINUXFLAG=true +elif [[ $1 = '-tilera_memprof' ]] +then +TILERAMEMPROFFLAG=true +elif [[ $1 = '-tileraconfig' ]] +then +TILERACONFIG="$2" +shift elif [[ $1 = '-rawconfig' ]] then RAWCONFIG="$2" @@ -162,13 +476,84 @@ shift elif [[ $1 = '-interrupt' ]] then INTERRUPTFLAG=true -elif [[ $1 = '-threadsimulate' ]] +elif [[ $1 = '-abcclose' ]] then -THREADSIMULATEFLAG=true +JAVAOPTS="$JAVAOPTS -abcclose" elif [[ $1 = '-optional' ]] then JAVAOPTS="$JAVAOPTS -optional" OPTIONALFLAG=true +elif [[ $1 = '-multicoregc' ]] +then +MULTICOREGCFLAG=true +JAVAOPTS="$JAVAOPTS -multicoregc" +elif [[ $1 = '-gcmem_local' ]] +then +GCMEMLOCALFLAG=true +elif [[ $1 = '-gcmem_fixed' ]] +then +GCMEMFIXEDFLAG=true +elif [[ $1 = '-gcmem_mixed' ]] +then +GCMEMMIXEDFLAG=true +elif [[ $1 = '-gcmem_global' ]] +then +GCMEMGLOBALFLAG=true +elif [[ $1 = '-gccache_local' ]] +then +GCCACHELOCALFLAG=true +elif [[ $1 = '-gccache_ran' ]] +then +GCCACHERANFLAG=true +elif [[ $1 = '-gccontroller_near' ]] +then +GCCONTROLLERNEARFLAG=true +elif [[ $1 = '-gccontroller_remote' ]] +then +GCCONTROLLERREMOTEFLAG=true +elif [[ $1 = '-gcsmallpagesize' ]] +then +GCSMALLPAGESIZEFLAG=true +elif [[ $1 = '-gcsmallpagesize2' ]] +then +GCSMALLPAGESIZEFLAG2=true +elif [[ $1 = '-gclargepagesize' ]] +then +GCLARGEPAGESIZEFLAG=true +elif [[ $1 = '-gclargepagesize2' ]] +then +GCLARGEPAGESIZE2FLAG=true +elif [[ $1 = '-gclargesharedheap' ]] +then +GCLARGESHAREDHEAPFLAG=true +elif [[ $1 = '-gclargesharedheap2' ]] +then +GCLARGESHAREDHEAPFLAG2=true +elif [[ $1 = '-gccacheadapt' ]] +then +GCCACHEADAPTFLAG=true +elif [[ $1 = '-gccacheadaptpolicy' ]] +then +GCCACHEADAPTPOLICYFLAG=true +GCCACHEADAPTPOLICY="$2" +shift +elif [[ $1 = '-gccachesampling' ]] +then +GCCACHESAMPLINGFLAG=true +elif [[ $1 = '-mgc' ]] +then +MGCFLAG=true +JAVAOPTS="$JAVAOPTS -mgc" +elif [[ $1 = '-mgcintel' ]] +then +MGCINTELFLAG=true +elif [[ $1 = '-objectlockdebug' ]] +then +OBJECTLOCKDEBUGFLAG=true +JAVAOPTS="$JAVAOPTS -objectlockdebug" +elif [[ $1 = '-gctbldebug' ]] +then +GCTBLDEBUGFLAG=true elif [[ $1 = '-dmalloc' ]] then USEDMALLOC=true @@ -178,13 +563,125 @@ RECOVERFLAG=true JAVAOPTS="$JAVAOPTS -task" elif [[ $1 = '-useprofile' ]] then -JAVAOPTS="$JAVAOPTS -useprofile" +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 = '-noloop' ]] +then +JAVAOPTS="$JAVAOPTS -noloop" +elif [[ $1 = '-dcopts' ]] +then +JAVAOPTS="$JAVAOPTS -dcopts" +elif [[ $1 = '-delaycomp' ]] +then +JAVAOPTS="$JAVAOPTS -delaycomp" +EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP" +elif [[ $1 = '-hybrid' ]] +then +JAVAOPTS="$JAVAOPTS -hybrid" +EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID" +elif [[ $1 = '-minimize' ]] +then +JAVAOPTS="$JAVAOPTS -minimize" + +elif [[ $1 = '-ooojava' ]] +then +MLP_ON=true +JAVAOPTS="$JAVAOPTS -ooojava $2 $3" +EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP" +shift +shift + +elif [[ $1 = '-ooodebug-disable-task-mem-pool' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DOOO_DISABLE_TASKMEMPOOL" + +elif [[ $1 = '-ssjava' ]] +then +SSJAVA=true +JAVAOPTS="$JAVAOPTS -ssjava" + +elif [[ $1 = '-mempool-detect-misuse' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DMEMPOOL_DETECT_MISUSE" + +elif [[ $1 = '-heapsize-mb' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DINITIALHEAPSIZE_MB=($2)" +shift + +elif [[ $1 = '-nostalltr' ]] +then +JAVAOPTS="$JAVAOPTS -nostalltr" + +elif [[ $1 = '-printlinenum' ]] +then +JAVAOPTS="$JAVAOPTS -printlinenum" + +elif [[ $1 = '-rcr' ]] +then +JAVAOPTS="$JAVAOPTS -rcr" +RCR=true +EXTRAOPTIONS="$EXTRAOPTIONS -DRCR -I$ROBUSTROOT/Runtime/oooJava" + +elif [[ $1 = '-rcr_debug' ]] +then +JAVAOPTS="$JAVAOPTS -rcr_debug" +RCR_DEBUG=true + +elif [[ $1 = '-rcr_debug_verbose' ]] +then +JAVAOPTS="$JAVAOPTS -rcr_debug_verbose" +RCR_DEBUG_VERBOSE=true + +elif [[ $1 = '-debug-deque' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG_DEQUE" + +elif [[ $1 = '-nolock' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DNOLOCK" + +elif [[ $1 = '-coreprof' ]] +then +COREPROF=true +JAVAOPTS="$JAVAOPTS -coreprof" +EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof" + +elif [[ $1 = '-coreprof-eventwords' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DCP_MAXEVENTWORDS=($2)" +shift + +elif [[ $1 = '-coreprof-checkoverflow' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF_CHECKOVERFLOW" + +elif [[ $1 = '-coreprof-enable' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -D$2" +shift + +elif [[ $1 = '-mlp' ]] +then +MLP_ON=true +EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP" +JAVAOPTS="$JAVAOPTS -mlp $2 $3" +shift +shift + +elif [[ $1 = '-mlpdebug' ]] +then +JAVAOPTS="$JAVAOPTS -mlpdebug" + elif [[ $1 = '-check' ]] then CHECKFLAG=true @@ -200,39 +697,69 @@ cd $CURDIR shift elif [[ $1 = '-debug' ]] then -RAWDEBUGFLAG=true -EXTRAOPTIONS="$EXTRAOPTIONS -g" +DEBUGFLAG=true +EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic" elif [[ $1 = '-rawpath' ]] then RAWPATHFLAG=true elif [[ $1 = '-runtimedebug' ]] then -EXTRAOPTIONS="$EXTRAOPTIONS -DCHECKTA" +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" +EXTRAOPTIONS="$EXTRAOPTIONS -O3" elif [[ $1 = '-thread' ]] then JAVAOPTS="$JAVAOPTS -thread" EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread" THREADFLAG=true +elif [[ $1 = '-recovery' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY" +DSMRECOVERY=true +elif [[ $1 = '-recoverystats' ]] +then +JAVAOPTS="$JAVAOPTS -recoverystats" +EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS" +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" +BUILDDIR="$CURDIR/$tmpbuilddirectory" + +BAMBOORUNTIME=$ROBUSTROOT/Runtime/bamboo cd $1 cd $CURDIR @@ -245,25 +772,103 @@ then JAVAOPTS="$JAVAOPTS -struct structfile" fi + + +######################### +# Setup class path +######################### +if $JNI + then + JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/classpath/ -classlibrary $ROBUSTROOT/classpath/vm/reference" + +elif $MGCINTELFLAG + then + JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/MGC/ -classlibrary $ROBUSTROOT/ClassLibrary/MGC/gnu/" + +elif $MGCFLAG + then + #base multicore gc files + JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/MGC/ -classlibrary $ROBUSTROOT/ClassLibrary/MGC/gnu/" + +elif $SSJAVA + then + JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/SSJava" + +else + 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 + + elif $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" + + else + #base java stuff + JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java" + fi +fi + +# everyone gets this except ssjava! +if ! $SSJAVA + then + JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/" +fi +######################### +# end classpath +######################### + + + # Build bristlecone/java sources if $MULTICOREFLAG -then -if ! java -Xms50m -Xmx800m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \ -$ROBUSTROOT/ClassLibrary/ -dir $BUILDDIR \ -$JAVAOPTS $SRCFILES -then exit $? -fi + then + if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main \ + -dir $BUILDDIR $JAVAOPTS $SRCFILES + then exit $? + fi + else -#if ! java -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \ -if ! $NOJAVA -then -if ! java -Xms50m -Xmx600m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \ -$ROBUSTROOT/ClassLibrary/ -dir $BUILDDIR -precise \ -$JAVAOPTS $SRCFILES -then exit $? -fi + + if $MGCINTELFLAG + then + if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main $JAVAOPTS \ + -dir $BUILDDIR -precise $SRCFILES + then exit $? + fi + + else + if ! $NOJAVA + then + if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main \ + -dir $BUILDDIR -precise $JAVAOPTS $SRCFILES + then exit $? + fi + fi + fi fi + +if $EXITAFTERANALYSIS +then +exit fi # Build all of the consistency specs @@ -307,7 +912,7 @@ fi # CHECKFLAG if $RAWFLAG then # RAWFLAG RAWDIR="$CURDIR/raw" -MAKEFILE="../Makefile.raw" +MAKEFILE="Makefile.raw" mkdir $RAWDIR cd $RAWDIR make clean @@ -320,19 +925,24 @@ then # print path RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH" fi -if $RAWDEBUGFLAG +if $DEBUGFLAG then #debug version -RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWDEBUG" +RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG" fi -if $RAWPROFILEFLAG +if $PROFILEFLAG then # profile version -RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPROFILE" +RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE" +fi + +if $ACCURATEPROFILEFLAG +then # accurateprofile version +RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE" fi -if $RAWUSEIOFLAG +if $USEIOFLAG then # useio version -RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWUSEIO" +RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO" fi if $INTERRUPTFLAG @@ -340,25 +950,290 @@ then #INTERRUPT version RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT" fi #INTERRUPT version -MAKEFILE="$MAKEFILE.$RAWCONFIG" - -if $RAWUSEIOFLAG +if $USEIOFLAG then # useio version MAKEFILE="$MAKEFILE.io" echo "+++++++++++use Makefile.raw.io++++++++++++++++" +else +MAKEFILE="$MAKEFILE.$RAWCONFIG" fi #useio version -cp $MAKEFILE ./Makefile +cp $BAMBOORUNTIME/RAW/$MAKEFILE ./Makefile cp ../Runtime/*.c ./ cp ../Runtime/*.h ./ cp ../Runtime/*.S ./ cp ../Runtime/*.s ./ -cp ../tmpbuilddirectory/*.c ./ -cp ../tmpbuilddirectory/*.h ./ +cp $BAMBOORUNTIME/*.c ./ +cp $BAMBOORUNTIME/*.h ./ +cp $BAMBOORUNTIME/RAW/*.c ./ +cp $BAMBOORUNTIME/RAW/*.h ./ +cp $BAMBOORUNTIME/RAW/*.S ./ +cp $BAMBOORUNTIME/RAW/*.s ./ +cp ../$tmpbuilddirectory/*.c ./ +cp ../$tmpbuilddirectory/*.h ./ + +make + +elif $TILERAFLAG +then # TILERAFLAG +TILERADIR="$CURDIR/tilera" +if $TILERABMEFLAG +then # TILERABMEFLAG +TILERA_INDIR="BME" +MAKEFILE="Makefile.tilera.$TILERACORES" +#SIMHVC="sim.hvc.$TILERACONFIG" +PCIHVC="pci.hvc.$TILERACORES" +if $TILERA56COREFLAG +then + PCIHVC="$PCIHVC.56" +fi +elif $TILERAZLINUXFLAG +then # TILERAZLINUXFLAG +TILERA_INDIR="ZLinux" +MAKEFILE="Makefile.tilera.$TILERACONFIG" +fi + +mkdir $TILERADIR +cd $TILERADIR +make clean +rm ./* + +if $MGCFLAG +then +export TILERACFLAGS="-DMULTICORE -DCLOSE_PRINT -DTILERA" +else +export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA" +fi + +if $GCTBLDEBUGFLAG +then +TILERACFLAGS="${TILERACFLAGS} -DGC_TBL_DEBUG" +fi + +if $OBJECTLOCKDEBUGFLAG +then +TILERACFLAGS="${TILERACFLAGS} -DOBJECT_LOCK_DEBUG" +fi + +if $TILERAMEMPROFFLAG +then # not only with 1 core + PCIHVC="$PCIHVC.memprof" + TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF" +fi + +if $TILERABMEFLAG +then # TILERABMEFLAG +TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME" +elif $TILERAZLINUXFLAG +then # TILERAZLINUXFLAG +TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX" +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 $PROFILEINTERRUPTFLAG +then # profile_interrupt version +TILERACFLAGS="${TILERACFLAGS} -DPROFILE_INTERRUPT" +fi + +if $USEIOFLAG +then # useio version +TILERACFLAGS="${TILERACFLAGS} -DUSEIO" +fi + +if $INTERRUPTFLAG +then #INTERRUPT version +TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT" +fi #INTERRUPT version + +if $MGCFLAG +then #MGCFLAG +TILERACFLAGS="${TILERACFLAGS} -DMGC -DMGC_SPEC" +fi + +if $MULTICOREGCFLAG +then #MULTICOREGC version +TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}" +fi + +if $GCPROFILEFLAG +then # GC_PROFILE version +TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE" +fi + +if $GCPROFILESFLAG +then # GC_PROFILE_S version +TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S" +fi + +if $GCMEMLOCALFLAG +then # SMEMLOCAL version +TILERACFLAGS="${TILERACFLAGS} -DSMEML" +fi + +if $GCMEMFIXEDFLAG +then # SMEMFIXED version +TILERACFLAGS="${TILERACFLAGS} -DSMEMF" +fi + +if $GCMEMMIXEDFLAG +then # SMEMMIXED version +TILERACFLAGS="${TILERACFLAGS} -DSMEMM" +fi + +if $GCMEMGLOBALFLAG +then # SMEMGLOBAL version +TILERACFLAGS="${TILERACFLAGS} -DSMEMG" +fi + +if $GCCACHELOCALFLAG +then # CACHE_LOCAL version +TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL" +fi + +if $GCCACHERANFLAG +then # CACHE_RAN version +TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN" +fi + +if $GCCONTROLLERNEARFLAG +then # CONTROLLER_NEAR version +TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR" +fi + +if $GCCONTROLLERREMOTEFLAG +then # CONTROLLER_REMOTE version +TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE" +fi + +if $GCSMALLPAGESIZEFLAG +then # GC_SMALLPAGESIZE version +TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE" +fi + +if $GCLARGEPAGESIZEFLAG +then # GC_LARGEPAGESIZE version +TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE" +fi + +if $GCLARGEPAGESIZE2FLAG +then # GC_LARGEPAGESIZE2 version +TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE2" +fi + +if $GCLARGESHAREDHEAPFLAG +then # GC_LARGESHAREDHEAP version +TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP" +fi + +if $GCSMALLPAGESIZEFLAG2 +then # GC_SMALLPAGESIZE2 version +TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2" +fi + +if $GCLARGESHAREDHEAPFLAG2 +then # GC_LARGESHAREDHEAP2 version +TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2" +fi + +if $GCCACHEADAPTFLAG +then # GC_CACHE_ADAPT version +TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_ADAPT" +fi + +if $GCCACHEADAPTPOLICYFLAG +then # GC_CACHE_ADAPT version +TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_ADAPT_POLICY${GCCACHEADAPTPOLICY}" +fi + +if $GCCACHESAMPLINGFLAG +then # GC_CACHE_ADAPT version +TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_SAMPLING" +fi + +if $MGCFLAG +then +cp $ROBUSTROOT/Tilera/Runtime/MGC/$MAKEFILE ./Makefile +else +cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile +fi +if $TILERABMEFLAG +then # TILERABMEFLAG +#cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc +cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc +if $TILERA56COREFLAG +then +cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc.56 ./bamboo-vmlinux-pci.hvc.56 +else +cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc +fi +fi +cp ../Runtime/Queue.c ./ +cp ../Runtime/file.c ./ +cp ../Runtime/math.c ./ +if [ !$MGCFLAG ] +then +cp ../Runtime/object.c ./ +fi +cp ../Runtime/GenericHashtable.c ./ +cp ../Runtime/SimpleHash.c ./ +cp ../Runtime/ObjectHash.c ./ +cp ../Runtime/socket.c ./ +cp ../Runtime/mem.c ./ +cp ../Runtime/GenericHashtable.h ./ +cp ../Runtime/mem.h ./ +if [ !$MGCFLAG ] +then +cp ../Runtime/object.h ./ +fi +cp ../Runtime/ObjectHash.h ./ +cp ../Runtime/Queue.h ./ +cp ../Runtime/runtime.h ./ +cp ../Runtime/SimpleHash.h ./ +cp $BAMBOORUNTIME/*.c ./ +cp $BAMBOORUNTIME/*.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 +#if $TILERAMEMPROFFLAG +#then # TILERAMEMPROFFLAG +cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./ +#fi +if $MGCFLAG +then +cp ../Tilera/Runtime/MGC/*.c ./ +cp ../Tilera/Runtime/MGC/*.h ./ +fi +cp ../Tilera/lib/* ./ +cp ../$tmpbuilddirectory/*.c ./ +cp ../$tmpbuilddirectory/*.h ./ make -else #!RAWFLAG +else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG cd $CURDIR INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \ @@ -366,7 +1241,8 @@ INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \ if $MULTICOREFLAG then -RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c" +RUNTIMEFILE="$BAMBOORUNTIME/multicoreruntime.c $BAMBOORUNTIME/multicoretask.c" +INCLUDES="$INCLUDES -I$BAMBOORUNTIME" else RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c" fi @@ -376,17 +1252,87 @@ $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/taskgarbage.c $ROBUSTROOT/Runtime/oojgarbage.c \ $ROBUSTROOT/Runtime/math.c \ $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c" +if $JNI +then +FILES="$FILES $ROBUSTROOT/Runtime/jni/jni.c $ROBUSTROOT/Runtime/jni/jni-stuff.c" +fi + +if $NUMA +then +FILES="$FILES $ROBUSTROOT/Runtime/affinity.c" +fi + +if $EVENTMONITOR +then +FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c" +fi + +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/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" +else EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME" -if $TRANSSTATSFLAG +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 -DTRANSSTATS -DCOMPILER -DDSTM -I$DSMRUNTIME" +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 +if $DSMFLAG +then +FILES="$FILES $DSMRUNTIME/sandbox.c" +else +FILES="$FILES $STMRUNTIME/sandbox.c" +fi +fi + +if $ABORTREADERS +then +FILES="$FILES $DSMRUNTIME/abortreaders.c" +fi + +if $FASTCHECK +then +FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c" +fi + +if $COREPROF +then +FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c" +fi + +if $RCR +then +FILES="$FILES $tmpbuilddirectory/RuntimeConflictResolver.c $ROBUSTROOT/Runtime/oooJava/hashRCR.c $ROBUSTROOT/Runtime/oooJava/Queue_RCR.c $ROBUSTROOT/Runtime/oooJava/hashStructure.c $ROBUSTROOT/Runtime/oooJava/trqueue.c $ROBUSTROOT/Runtime/oooJava/rcr_runtime.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" +if ! $SQUEUE +then +FILES="$FILES $ROBUSTROOT/Runtime/deque.c" fi -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 $DSMRUNTIME/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRUNTIME/sockpool.c $DSMRUNTIME/addUdpEnhance.c $DSMRUNTIME/signal.c $DSMRUNTIME/gCollect.c $DSMRUNTIME/addPrefetchEnhance.c $DSMRUNTIME/dsmlock.c" fi if $RECOVERFLAG @@ -396,7 +1342,7 @@ if $MULTICOREFLAG then EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE" fi -FILES="$FILES tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c" +FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c" if $RAWFLAG then EXTRAOPTIONS="$EXTRAOPTIONS -DRAW" @@ -411,7 +1357,7 @@ fi if $OPTIONALFLAG then EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL" -FILES="$FILES tmpbuilddirectory/optionalarrays.c" +FILES="$FILES $tmpbuilddirectory/optionalarrays.c" fi if $THREADFLAG @@ -430,16 +1376,34 @@ then EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC" fi +echo Compiling C... +echo EXTRAOPTIONS=$EXTRAOPTIONS + +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 +NONMULTICOREOPTS= else -gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \ -tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin +NONMULTICOREOPTS=-DPRECISE_GC +fi + +if $SRCAFTERPP +then +gcc -E $INCLUDES $EXTRAOPTIONS $NONMULTICOREOPTS \ +$tmpbuilddirectory/methods.c $FILES > tmp.c fi +gcc $INCLUDES $EXTRAOPTIONS $NONMULTICOREOPTS \ +$tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin + + fi #!RAWFLAG + exit