From: bdemsky Date: Wed, 6 Jul 2011 10:37:47 +0000 (+0000) Subject: changes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2dd0a86e529f8c7697d2cd1942f2b750a19312bc;p=IRC.git changes --- diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index 7dc9af22..77d444dd 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -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;"); diff --git a/Robust/src/Runtime/bamboo/pmc_forward.c b/Robust/src/Runtime/bamboo/pmc_forward.c index bb5bd7e2..e073b365 100644 --- a/Robust/src/Runtime/bamboo/pmc_forward.c +++ b/Robust/src/Runtime/bamboo/pmc_forward.c @@ -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; diff --git a/Robust/src/Runtime/bamboo/pmc_mark.c b/Robust/src/Runtime/bamboo/pmc_mark.c index a8dbf8d0..894c6516 100644 --- a/Robust/src/Runtime/bamboo/pmc_mark.c +++ b/Robust/src/Runtime/bamboo/pmc_mark.c @@ -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); } } diff --git a/Robust/src/Runtime/bamboo/pmc_refupdate.c b/Robust/src/Runtime/bamboo/pmc_refupdate.c index d019b281..c5dff1ca 100644 --- a/Robust/src/Runtime/bamboo/pmc_refupdate.c +++ b/Robust/src/Runtime/bamboo/pmc_refupdate.c @@ -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); } diff --git a/Robust/src/buildscript b/Robust/src/buildscript index 7d672df9..0691524d 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -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