changes
authorbdemsky <bdemsky>
Wed, 6 Jul 2011 10:37:47 +0000 (10:37 +0000)
committerbdemsky <bdemsky>
Wed, 6 Jul 2011 10:37:47 +0000 (10:37 +0000)
Robust/src/IR/Flat/BuildCode.java
Robust/src/Runtime/bamboo/pmc_forward.c
Robust/src/Runtime/bamboo/pmc_mark.c
Robust/src/Runtime/bamboo/pmc_refupdate.c
Robust/src/buildscript

index 7dc9af22b6e21b9fb2dac146da10047d1405df8b..77d444ddce11575212694dc78023806370b7f6fe 100644 (file)
@@ -698,6 +698,10 @@ public class BuildCode {
       if(state.MULTICOREGC) {
         //outclassdefs.println("  int marked;");
       }
+      if(state.PMC) {
+        outclassdefs.println("  int marked;");
+       outclassdefs.println("  void * backward;");
+      }
     }
     if (state.TASK) {
       outclassdefs.println("  int flag;");
@@ -712,6 +716,10 @@ public class BuildCode {
         if(state.MULTICOREGC) {
           //outclassdefs.println("  int marked;");
         }
+       if(state.PMC) {
+         outclassdefs.println("  int marked;");
+         outclassdefs.println("  void * backward;");
+       }
       }
       if(state.OPTIONAL) {
         outclassdefs.println("  int numfses;");
@@ -1654,6 +1662,10 @@ fldloop:
       if(state.MULTICOREGC) {
         //classdefout.println("  int marked;");
       }
+      if(state.PMC) {
+        classdefout.println("  int marked;");
+       classdefout.println("  void * backward;");
+      }
     }
     if (state.TASK) {
       classdefout.println("  int flag;");
@@ -1669,6 +1681,10 @@ fldloop:
         if(state.MULTICOREGC) {
           //classdefout.println("  int marked;");
         }
+       if(state.PMC) {
+         classdefout.println("  int marked;");
+         classdefout.println("  void * backward;");
+       }
       }
       if (state.OPTIONAL) {
         classdefout.println("  int numfses;");
index bb5bd7e2d31b521f38d100b014eba98444c439aa..e073b3651214e81f2af84d178d6b356a378ccbe1 100644 (file)
@@ -24,7 +24,7 @@ void pmc_countbytes(struct pmc_unit * unit, void *bottomptr, void *topptr) {
       continue;
     }
     size=((size-1)&(~(ALIGNMENTSIZE-1)))+ALIGNMENTSIZE;
-    if (((struct ___Object___ *)tmpptr)->mark)
+    if (((struct ___Object___ *)tmpptr)->marked)
       totalbytes+=size;
     tmpptr+=size;
   }
@@ -128,8 +128,8 @@ void pmc_forward(struct pmc_region *region, unsigned int totalbytes, void *botto
     }
     size=((size-1)&(~(ALIGNMENTSIZE-1)))+ALIGNMENTSIZE;
 
-    if (((struct ___Object___ *)tmpptr)->mark) {
-      ((struct ___Object___ *)tmpptr)->mark=forwardptr;
+    if (((struct ___Object___ *)tmpptr)->marked) {
+      ((struct ___Object___ *)tmpptr)->marked=forwardptr;
       void *newforwardptr=forwardptr+size;
       while(newforwardptr>endunit) {
        pmc_heapptr->region[currunit].endptr=newforwardptr;
index a8dbf8d02cb3c44efe7c35d56443cd5bcc47aff7..894c6516960d3728a3379bb6006e1b5a35052adc 100644 (file)
@@ -5,8 +5,8 @@
 #define PMC_MARKOBJNONNULL(objptr) {pmc_markObj(objptr);}
 
 void pmc_markObj(struct ___Object___ *ptr) {
-  if (!ptr->mark) {
-    ptr->mark=1;
+  if (!ptr->marked) {
+    ptr->marked=1;
     pmc_enqueue(pmc_localqueue, ptr);
   }
 }
index d019b2815f7861a5734f263a4172c3e1a85bc391..c5dff1caf88054b48bbdd75d06fe8bc3539ac22d 100644 (file)
@@ -1,7 +1,7 @@
 #include "pmc_forward.h"
 #include "pmc_refupdate.h"
 
-#define pmcupdateObj(objptr) ((void *)((struct ___Object___ *)objptr)->mark)
+#define pmcupdateObj(objptr) ((void *)((struct ___Object___ *)objptr)->marked)
 
 #define PMCUPDATEOBJ(obj) {void *updatetmpptr=obj; if (updatetmpptr!=NULL) {obj=pmcupdateObj(updatetmpptr);}}
 
@@ -44,7 +44,7 @@ void pmc_referenceupdate(void *bottomptr, void *topptr) {
       continue;
     }
     //if marked we update the pointers
-    if (((struct ___Object___ *) tmpptr)->mark) {
+    if (((struct ___Object___ *) tmpptr)->marked) {
       pmc_updatePtrs(tmpptr, type);
     }
     tmpptr+=size;
@@ -69,8 +69,8 @@ void pmc_compact(struct pmc_region * region, int forward, void *bottomptr, void
        continue;
       }
       //if marked we update the pointers
-      void *forwardptr=(void *)((struct ___Object___ *) tmpptr)->mark;
-      ((struct ___Object___ *) tmpptr)->mark=NULL;
+      void *forwardptr=(void *)((struct ___Object___ *) tmpptr)->marked;
+      ((struct ___Object___ *) tmpptr)->marked=NULL;
       if (forwardptr) {
        memmove(forwardptr, tmpptr, size);
       }
@@ -85,8 +85,8 @@ void pmc_compact(struct pmc_region * region, int forward, void *bottomptr, void
       unsigned int type;
       unsigned int size;
       gettype_size(tmpptr, &type, &size);
-      void *forwardptr=(void *)((struct ___Object___ *) lastobj)->mark;
-      ((struct ___Object___ *) lastobj)->mark=NULL;
+      void *forwardptr=(void *)((struct ___Object___ *) lastobj)->marked;
+      ((struct ___Object___ *) lastobj)->marked=NULL;
       if (forwardptr) {
        memmove(forwardptr, lastobj, size);
       }
index 7d672df9b44b4cf81fac9dc89af6c2d00c549e23..0691524d332dd8cd174558361aeacf9ea81a818f 100755 (executable)
@@ -86,6 +86,7 @@ echo "-useio use standard io to output profiling data (should be used together w
 echo
 echo Multicore GC options
 echo -multicoregc generate multi-core binary with garbage collection
+echo -pmc parallel collector
 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)"
@@ -207,6 +208,7 @@ USEIOFLAG=false
 INTERRUPTFLAG=false
 THREADSIMULATEFLAG=false;
 MULTICOREGCFLAG=false;
+PMCFLAG=false;
 GCMEMLOCALFLAG=false;
 GCMEMFIXEDFLAG=false;
 GCMEMMIXEDFLAG=false;
@@ -488,6 +490,10 @@ elif [[ $1 = '-multicoregc' ]]
 then
 MULTICOREGCFLAG=true
 JAVAOPTS="$JAVAOPTS -multicoregc"
+elif [[ $1 = '-pmc' ]]
+then
+PMCFLAG=true
+JAVAOPTS="$JAVAOPTS -pmc"
 elif [[ $1 = '-gcmem_local' ]]
 then
 GCMEMLOCALFLAG=true
@@ -1079,6 +1085,11 @@ then #MULTICOREGC version
 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
 fi
 
+if $PMCFLAG
+then #MULTICOREGC version
+TILERACFLAGS="${TILERACFLAGS} -DPMC_GC -D${GCCORES}"
+fi
+
 if $GCPROFILEFLAG
 then # GC_PROFILE version
 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
@@ -1237,6 +1248,8 @@ cp ../Tilera/lib/* ./
 cp ../$tmpbuilddirectory/*.c ./
 cp ../$tmpbuilddirectory/*.h ./
 
+echo $TILERA_CFLAGS
+
 make
 
 else #!RAWFLAG && !TILERABMEFLAG  && ! TILERAZLINUXFLAG