changes
[IRC.git] / Robust / src / buildscript
index a4b4958d4f8148e0a50dd5190e6230a3492eb197..a1b162f8de158062e547835a8a08023e60ea1a90 100755 (executable)
@@ -21,7 +21,7 @@ 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_count_poolalloc, cpe_count_poolreuse, cpe_workschedgrab, cpe_taskdispatch, cpe_preparememq, cpe_taskexecute, cpe_taskretire, cpe_taskstallvar, cpe_taskstallmem 
+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 <numberofcores> <maxseseage>"
 echo -ooodebug general OOOJava debugging messages
 echo -ooodebug-disable-task-mem-pool this is a tricky module, disable for simpler runtime
@@ -508,6 +508,7 @@ GCCACHESAMPLINGFLAG=true
 elif [[ $1 = '-mgc' ]]
 then
 MGCFLAG=true
+JAVAOPTS="$JAVAOPTS -mgc"
 elif [[ $1 = '-dmalloc' ]]
 then
 USEDMALLOC=true
@@ -567,7 +568,7 @@ elif [[ $1 = '-rcr' ]]
 then
 JAVAOPTS="$JAVAOPTS -rcr"
 RCR=true
-EXTRAOPTIONS="$EXTRAOPTIONS -I$ROBUSTROOT/Runtime/oooJava"
+EXTRAOPTIONS="$EXTRAOPTIONS -DRCR -I$ROBUSTROOT/Runtime/oooJava"
 
 
 elif [[ $1 = '-coreprof' ]]
@@ -716,6 +717,10 @@ elif $THREADFLAG
 then
 #threading java stuff
 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
+elif $MGCFLAG
+then
+#base multicore gc files
+JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/MGC"
 fi
 #base java stuff
 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
@@ -882,7 +887,12 @@ cd $TILERADIR
 make clean
 rm ./*
 
+if $MGCFLAG
+then
+export TILERACFLAGS="-DMULTICORE -DCLOSE_PRINT -DTILERA"
+else
 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
+fi
 
 if $TILERAMEMPROFFLAG
 then # not only with 1 core
@@ -1043,7 +1053,12 @@ 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
@@ -1058,7 +1073,10 @@ 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 ./
@@ -1066,7 +1084,10 @@ 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 ./
@@ -1100,6 +1121,11 @@ fi
 #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 ./
@@ -1188,7 +1214,7 @@ fi
 
 if $RCR
 then
-FILES="$FILES $tmpbuilddirectory/RuntimeConflictResolver.c $ROBUSTROOT/Runtime/oooJava/hashRCR.c $ROBUSTROOT/Runtime/oooJava/Queue_RCR.c
+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