From: adash Date: Fri, 25 Sep 2009 22:05:55 +0000 (+0000) Subject: bug fix in gcollect prefetch cache flush X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cf81a2ae2f8ae66999ca7e8d15cc790b68a223f5;p=IRC.git bug fix in gcollect prefetch cache flush other small changes --- diff --git a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile index 064683cb..f2162cd9 100644 --- a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile +++ b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile @@ -1,13 +1,19 @@ MAINCLASS=MatrixMultiply SRC1=${MAINCLASS}N.java SRC2=${MAINCLASS}Nrun.java -FLAGS=-dsm -dsmcaching -prefetch -optimize -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.98 +SRC3=${MAINCLASS}D.java \ + ../../../../ClassLibrary/JavaDSM/Barrier.java +SRC4=${MAINCLASS}D2.java \ + ../../../../ClassLibrary/JavaDSM/Barrier.java +SRC5=${MAINCLASS}D3.java \ + ../../../../ClassLibrary/JavaDSM/Barrier.java +FLAGS=-dsm -dsmcaching -optimize -prefetch -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.98 FLAGS1=-dsm -optimize -dsmcaching -mainclass ${MAINCLASS} FLAGS2=-dsm -optimize -mainclass ${MAINCLASS} default: - ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC1} - ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}NPC ${SRC1} - ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1} + ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC3} +# ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}NPC ${SRC1} + ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC3} # ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC200 ${SRC2} # ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N200 ${SRC2} diff --git a/Robust/src/ClassLibrary/JavaThread/Object.java b/Robust/src/ClassLibrary/JavaThread/Object.java index a9bf6f4d..a3bc22d9 100644 --- a/Robust/src/ClassLibrary/JavaThread/Object.java +++ b/Robust/src/ClassLibrary/JavaThread/Object.java @@ -6,6 +6,9 @@ public class Object { private Object nextlockobject; private Object prevlockobject; + // temporary extra unused int filed to align objects for Java + int wkhqwemnbmwnb; + public int hashCode() { if (!cachedHash) { cachedCode=nativehashCode(); diff --git a/Robust/src/Runtime/DSTM/interface/dstm.h b/Robust/src/Runtime/DSTM/interface/dstm.h index 9e80df55..c5288f88 100644 --- a/Robust/src/Runtime/DSTM/interface/dstm.h +++ b/Robust/src/Runtime/DSTM/interface/dstm.h @@ -57,7 +57,7 @@ //Prefetch tuning paramters //#define RETRYINTERVAL 20 //N (For Em3d, SOR, Moldyn benchmarks) //#define SHUTDOWNINTERVAL 3 //M -#define RETRYINTERVAL 100 //N (For MatrixMultiply, 2DFFT benchmarks) +#define RETRYINTERVAL 75 //N (For MatrixMultiply, 2DFFT benchmarks) #define SHUTDOWNINTERVAL 1 //M #include diff --git a/Robust/src/Runtime/DSTM/interface/gCollect.c b/Robust/src/Runtime/DSTM/interface/gCollect.c index 6e9d339e..a6c115aa 100644 --- a/Robust/src/Runtime/DSTM/interface/gCollect.c +++ b/Robust/src/Runtime/DSTM/interface/gCollect.c @@ -112,10 +112,10 @@ void clearBlock(objstr_t *block) { if ((val>=tmpbegin)&(valnext=next->next; free(next); - next=tmp; + next=curr; //loop condition is broken now...need to check before incrementing - if (next==NULL) - break; + // if (next==NULL) + // break; } } { diff --git a/Robust/src/Runtime/DSTM/interface/gCollect.h b/Robust/src/Runtime/DSTM/interface/gCollect.h index 194080d4..c5e4e13a 100644 --- a/Robust/src/Runtime/DSTM/interface/gCollect.h +++ b/Robust/src/Runtime/DSTM/interface/gCollect.h @@ -9,11 +9,11 @@ #define STALE_MINTHRESHOLD 10 //minimum size -#define STALE_MAXTHRESHOLD 30 //ugly hack..if you make this too small things +#define STALE_MAXTHRESHOLD 40 //ugly hack..if you make this too small things // will fail in odd subtle ways #define DEFAULT_OBJ_STORE_SIZE (4194304-16) //just a little less the 4MB -#define PREFETCH_FLUSH_THRESHOLD 20 //MINIMUM SIZE BEFORE FLUSHING +#define PREFETCH_FLUSH_THRESHOLD 30 //MINIMUM SIZE BEFORE FLUSHING #define STALL_THRESHOLD 15 //number of prefetches stores before we can start freeing old ones diff --git a/Robust/src/Runtime/DSTM/interface/trans.c b/Robust/src/Runtime/DSTM/interface/trans.c index b53e4bd5..8843d829 100644 --- a/Robust/src/Runtime/DSTM/interface/trans.c +++ b/Robust/src/Runtime/DSTM/interface/trans.c @@ -754,7 +754,7 @@ __attribute__((pure)) objheader_t *transRead2(unsigned int oid) { objheader_t *headerObj; int size; GETSIZE(size, objcopy); - if((headerObj = prefetchobjstrAlloc(size + sizeof(objheader_t))) == NULL) { + if((headerObj = prefetchobjstrAlloc(size+sizeof(objheader_t))) == NULL) { printf("%s(): Error in getting memory from prefetch cache at %s, %d\n", __func__, __FILE__, __LINE__); pthread_mutex_unlock(&prefetchcache_mutex); @@ -771,7 +771,6 @@ __attribute__((pure)) objheader_t *transRead2(unsigned int oid) { prehashInsert(oid, headerObj); } #endif - return &objcopy[1]; #else return objcopy;