Add code for GC_CACHE_ADAPT version. Now the 61-1gc version works for RayTracer...
[IRC.git] / Robust / src / buildscript
index aac0f29b62832cf788ad8f067d960058aa87d3fb..4c943b1eaab45e11f306974ba30775a2b3299cfa 100755 (executable)
@@ -18,8 +18,29 @@ echo "-eventmonitor turn on transaction event trace recording"
 echo
 echo OOOJava options
 echo -coreprof turn on profiling API
-echo -ooojava numberofcores maxseseage
-echo -mlp <num cores> <max sese age> build mlp code
+echo -coreprof-checkoverflow ONLY use for debugging event overflow
+echo "-ooojava <numberofcores> <maxseseage>"
+echo -ooodebug general OOOJava debugging messages
+echo -rcr turn on runtime conflict resolver
+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 <all/final> 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 <filename> <normal/tabbed> write sharing for normal human reading or LaTeX tabbed"
+echo "-disjoint-debug-callsite <callee> <caller> <visit to start> <num caps> <T/F stop after>"
+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 <method> <visit to start> <num caps> <T/F stop after>"
+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 "-mlp <num cores> <max sese age> build mlp code"
 echo -mlpdebug if mlp, report progress and interim results
 echo
 echo DSM options
@@ -56,9 +77,11 @@ echo "-gccontroller_remote set the gc shared memory to use a remote controller f
 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 "-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 Other options
@@ -84,6 +107,7 @@ echo -tagstate do tag state analysis
 echo -optional enable optional
 echo -debug generate debug symbols
 echo -prefetch do prefetch analysis
+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
@@ -130,6 +154,7 @@ NOJAVA=false
 CHECKFLAG=false
 RECOVERFLAG=false
 MLP_ON=false
+RCR=false
 MLPDEBUG=false
 MULTICOREFLAG=false
 RAWFLAG=false
@@ -146,6 +171,7 @@ PROFILEFLAG=false
 GCPROFILEFLAG=false
 GCPROFILESFLAG=false
 ACCURATEPROFILEFLAG=false
+PROFILEINTERRUPTFLAG=false
 USEIOFLAG=false
 INTERRUPTFLAG=false
 THREADSIMULATEFLAG=false;
@@ -163,6 +189,7 @@ GCLARGEPAGESIZEFLAG=false;
 GCLARGESHAREDHEAPFLAG=false;
 GCSMALLPAGESIZEFLAG2=false;
 GCLARGESHAREDHEAPFLAG2=false;
+GCCACHEADAPTFLAG=false
 USEDMALLOC=false
 THREADFLAG=false
 FASTCHECK=false
@@ -176,8 +203,8 @@ OPTIONALFLAG=false
 EXITAFTERANALYSIS=false
 ASSEMBLY=false
 GCCORES=''
-GC1COREFLAG=false
 TILERAN1COREFLAG=false
+TILERA56COREFLAG=false
 
 if [[ -z $1 ]]
 then
@@ -329,6 +356,9 @@ GCPROFILESFLAG=true
 elif [[ $1 = '-accurateprofile' ]]
 then
 ACCURATEPROFILEFLAG=true
+elif [[ $1 = '-profile_interrupt' ]]
+then
+PROFILEINTERRUPTFLAG=true
 elif [[ $1 = '-useio' ]]
 then
 USEIOFLAG=true
@@ -351,16 +381,16 @@ JAVAOPTS="$JAVAOPTS -numcore $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"
-if [[ "$2" -eq "1" ]]
-then
-GC1COREFLAG=true
-fi
 shift
 elif [[ $1 = '-raw' ]]
 then
@@ -441,6 +471,9 @@ GCLARGESHAREDHEAPFLAG=true
 elif [[ $1 = '-gclargesharedheap2' ]]
 then
 GCLARGESHAREDHEAPFLAG2=true
+elif [[ $1 = '-gccacheadapt' ]]
+then
+GCCACHEADAPTFLAG=true
 elif [[ $1 = '-dmalloc' ]]
 then
 USEDMALLOC=true
@@ -487,13 +520,27 @@ EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
 shift
 shift
 
+elif [[ $1 = '-heapsize-mb' ]]
+then
+EXTRAOPTIONS="$EXTRAOPTIONS -DINITIALHEAPSIZE_MB=($2)"
+shift
+
+elif [[ $1 = '-rcr' ]]
+then
+JAVAOPTS="$JAVAOPTS -rcr"
+RCR=true
+EXTRAOPTIONS="$EXTRAOPTIONS -I$ROBUSTROOT/Runtime/oooJava"
+
+
 elif [[ $1 = '-coreprof' ]]
 then
 COREPROF=true
 JAVAOPTS="$JAVAOPTS -coreprof"
 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
-shift
-shift
+
+elif [[ $1 = '-coreprof-checkoverflow' ]]
+then
+EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF_CHECKOVERFLOW"
 
 elif [[ $1 = '-mlp' ]]
 then
@@ -765,12 +812,9 @@ TILERA_INDIR="BME"
 MAKEFILE="Makefile.tilera.$TILERACONFIG"
 SIMHVC="sim.hvc.$TILERACONFIG"
 PCIHVC="pci.hvc.$TILERACONFIG"
-if $GC1COREFLAG 
-then # 1-core gc
-  if $TILERAN1COREFLAG
-  then # not only with 1 core
-       PCIHVC="$PCIHVC.1gc"
-  fi
+if $TILERA56COREFLAG
+then
+  PCIHVC="$PCIHVC.56"
 fi
 elif $TILERAZLINUXFLAG
 then # TILERAZLINUXFLAG
@@ -824,6 +868,11 @@ 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"
@@ -914,14 +963,23 @@ then # GC_LARGESHAREDHEAP2 version
 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
 fi
 
+if $GCCACHEADAPTFLAG
+then # GC_CACHE_ADAPT version
+TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_ADAPT"
+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
+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/multicoretask.c ./
 cp ../Runtime/multicoreruntime.c ./
 cp ../Runtime/Queue.c ./
@@ -1046,6 +1104,11 @@ 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" 
+fi
+
 if $MLP_ON
 then
 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"