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;");
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;");
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;");
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;");
continue;
}
size=((size-1)&(~(ALIGNMENTSIZE-1)))+ALIGNMENTSIZE;
- if (((struct ___Object___ *)tmpptr)->mark)
+ if (((struct ___Object___ *)tmpptr)->marked)
totalbytes+=size;
tmpptr+=size;
}
}
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;
#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);
}
}
#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);}}
continue;
}
//if marked we update the pointers
- if (((struct ___Object___ *) tmpptr)->mark) {
+ if (((struct ___Object___ *) tmpptr)->marked) {
pmc_updatePtrs(tmpptr, type);
}
tmpptr+=size;
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);
}
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);
}
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)"
INTERRUPTFLAG=false
THREADSIMULATEFLAG=false;
MULTICOREGCFLAG=false;
+PMCFLAG=false;
GCMEMLOCALFLAG=false;
GCMEMFIXEDFLAG=false;
GCMEMMIXEDFLAG=false;
then
MULTICOREGCFLAG=true
JAVAOPTS="$JAVAOPTS -multicoregc"
+elif [[ $1 = '-pmc' ]]
+then
+PMCFLAG=true
+JAVAOPTS="$JAVAOPTS -pmc"
elif [[ $1 = '-gcmem_local' ]]
then
GCMEMLOCALFLAG=true
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"
cp ../$tmpbuilddirectory/*.c ./
cp ../$tmpbuilddirectory/*.h ./
+echo $TILERA_CFLAGS
+
make
else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG