From: bdemsky Date: Mon, 21 Dec 2009 22:34:41 +0000 (+0000) Subject: check in bug fix....from 30,000 ft. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=22819f8f17b6b409b95254d0d1c33c5be869516a;p=IRC.git check in bug fix....from 30,000 ft. --- diff --git a/Robust/src/Runtime/DSTM/interface/prefetch.c b/Robust/src/Runtime/DSTM/interface/prefetch.c index fc65a716..59e4603a 100644 --- a/Robust/src/Runtime/DSTM/interface/prefetch.c +++ b/Robust/src/Runtime/DSTM/interface/prefetch.c @@ -94,7 +94,7 @@ perMcPrefetchList_t *processLocal(char *ptr, int numprefetches) { int countInvalidObj=0; - objheader_t * header = searchObj(oid, &countInvalidObj); + objheader_t * header = searchObj(oid, top, &countInvalidObj); //printf("%u %x\n", oid, header); if (header==NULL) { LOGTIME('b',oid,0,0,countInvalidObj); @@ -118,7 +118,7 @@ perMcPrefetchList_t *processLocal(char *ptr, int numprefetches) { top+=2; dfsList[top]=oid; dfsList[top+1]=0; - header=searchObj(oid, &countInvalidObj); + header=searchObj(oid, top, &countInvalidObj); if (header==NULL) { LOGTIME('c',oid,top,0,countInvalidObj); //forward prefetch @@ -143,7 +143,7 @@ perMcPrefetchList_t *processLocal(char *ptr, int numprefetches) { //oid is 0 //go backwards until we can increment do { - int countInvalidObj1=1; + int countInvalidObj1=0; do { top-=2; if (top<0) { @@ -151,8 +151,11 @@ perMcPrefetchList_t *processLocal(char *ptr, int numprefetches) { } } while(dfsList[top+1] == GET_RANGE(offsetarray[top + 3])); - //header=searchObj(dfsList[top], &countInvalidObj1); - header=searchObj(dfsList[top], NULL); + //we backtracked past the invalid obj...set out countInvalidObj=-1 + if (top 1) { - return NULL; - } + if ((*countInvalidObj)==-1) { + *countInvalidObj=top; + } else { + return NULL; + } } } return header; @@ -560,7 +579,7 @@ unsigned int getNextOid(objheader_t * header, short * offsetarray, unsigned int if(currcount!=0 & range != 0) { //go to the next offset - header=searchObj(dfsList[top+2],countInvalidObj); + header=searchObjInv(dfsList[top+2], top, countInvalidObj); if (header==NULL) return 2; } diff --git a/Robust/src/Runtime/DSTM/interface/prefetch.h b/Robust/src/Runtime/DSTM/interface/prefetch.h index ee537c9a..bbc3f9b4 100644 --- a/Robust/src/Runtime/DSTM/interface/prefetch.h +++ b/Robust/src/Runtime/DSTM/interface/prefetch.h @@ -63,7 +63,8 @@ int rangePrefetchReq(int acceptfd, struct readstruct * readbuffer); int processOidFound(objheader_t *, short *, int, int, int); int getRangePrefetchResponse(int sd, struct readstruct *); //INLINE objheader_t *searchObj(unsigned int); -INLINE objheader_t *searchObj(unsigned int, int*); +INLINE objheader_t *searchObj(unsigned int); +INLINE objheader_t *searchObjInv(unsigned int, int, int*); /*********** Functions for computation at the participant end **********/