From: jzhou Date: Sat, 17 Jul 2010 21:45:20 +0000 (+0000) Subject: Move the auxiliary tables our of the shared heap X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=599243e356904fd26c95bc40196b5fd523dcf2e5;p=IRC.git Move the auxiliary tables our of the shared heap --- diff --git a/Robust/src/Runtime/multicoregarbage.c b/Robust/src/Runtime/multicoregarbage.c index 5c4095d6..eb249994 100644 --- a/Robust/src/Runtime/multicoregarbage.c +++ b/Robust/src/Runtime/multicoregarbage.c @@ -94,7 +94,7 @@ inline void dumpSMem() { sblock = gcreservedsb; bool advanceblock = false; // remaining memory - for(i=gcbaseva; i dst) { // do not have enough room to cache large objs #ifdef DEBUG @@ -808,7 +808,7 @@ inline bool cacheLObjs() { // cache the largeObjs to the top of the shared heap //gclobjtail2 = gclobjtail; //gclobjtailindex2 = gclobjtailindex; - dst = (BAMBOO_BASE_VA) + (BAMBOO_SHARED_MEM_SIZE); + dst = gcbaseva + (BAMBOO_SHARED_MEM_SIZE); while(gc_lobjmoreItems3_I()) { gc_lobjdequeue3_I(); size = gclobjtail2->lengths[gclobjtailindex2]; @@ -942,7 +942,7 @@ inline void moveLObjs() { // move large objs from gcheaptop to tmpheaptop // write the header first - unsigned int tomove = (BAMBOO_BASE_VA) + (BAMBOO_SHARED_MEM_SIZE) -gcheaptop; + unsigned int tomove = gcbaseva + (BAMBOO_SHARED_MEM_SIZE) -gcheaptop; #ifdef SMEMM gcmem_mixed_usedmem += tomove; #endif @@ -1769,14 +1769,14 @@ innernextSBlock: #ifdef DEBUG BAMBOO_DEBUGPRINT(orig->base); #endif - if(orig->base >= BAMBOO_BASE_VA + BAMBOO_SHARED_MEM_SIZE) { + if(orig->base >= gcbaseva + BAMBOO_SHARED_MEM_SIZE) { // out of boundary orig->ptr = orig->base; // set current ptr to out of boundary too return false; } //orig->bound = orig->base + BAMBOO_SMEM_SIZE; orig->blockbase = orig->base; - orig->sblockindex = (orig->blockbase-BAMBOO_BASE_VA)/BAMBOO_SMEM_SIZE; + orig->sblockindex = (orig->blockbase-gcbaseva)/BAMBOO_SMEM_SIZE; sbchanged = true; int blocknum = 0; BLOCKINDEX(orig->base, &blocknum); @@ -1854,7 +1854,7 @@ inline bool initOrig_Dst(struct moveHelper * orig, // check the bamboo_smemtbl to decide the real bound orig->bound = orig->base + bamboo_smemtbl[blocknum]; orig->blockbase = orig->base; - orig->sblockindex = (orig->base - BAMBOO_BASE_VA) / BAMBOO_SMEM_SIZE; + orig->sblockindex = (orig->base - gcbaseva) / BAMBOO_SMEM_SIZE; #ifdef DEBUG BAMBOO_DEBUGPRINT(0xef02); BAMBOO_DEBUGPRINT_REG(orig->base); @@ -1869,7 +1869,7 @@ inline bool initOrig_Dst(struct moveHelper * orig, #endif // goto next sblock orig->blockbound = - BAMBOO_BASE_VA+BAMBOO_SMEM_SIZE*(orig->sblockindex+1); + gcbaseva+BAMBOO_SMEM_SIZE*(orig->sblockindex+1); return nextSBlock(orig); } else if(gcsbstarttbl[orig->sblockindex] != 0) { #ifdef DEBUG @@ -3019,8 +3019,8 @@ inline void gc(struct garbagelist * stackptr) { //int tmptopptr = 0; //BASEPTR(gctopcore, 0, &tmptopptr); // TODO - //tmptopptr = (BAMBOO_BASE_VA) + (BAMBOO_SHARED_MEM_SIZE); - tmpheaptop = (BAMBOO_BASE_VA) + (BAMBOO_SHARED_MEM_SIZE); + //tmptopptr = gcbaseva + (BAMBOO_SHARED_MEM_SIZE); + tmpheaptop = gcbaseva + (BAMBOO_SHARED_MEM_SIZE); #ifdef DEBUG BAMBOO_DEBUGPRINT(0xabab); BAMBOO_DEBUGPRINT_REG(tmptopptr); diff --git a/Robust/src/Runtime/multicoretask.c b/Robust/src/Runtime/multicoretask.c index 8ca658d7..979a044a 100644 --- a/Robust/src/Runtime/multicoretask.c +++ b/Robust/src/Runtime/multicoretask.c @@ -297,8 +297,8 @@ void initruntimedata() { BAMBOO_MEMSET_WH(gcrpointertbls,0,sizeof(mgcsharedhashtbl_t *)*NUMCORES4GC); //sizeof(struct RuntimeHash *)*NUMCORES4GC); #ifdef SMEMM - gcmem_mixed_threshold = - (unsigned int)((BAMBOO_SHARED_MEM_SIZE-(gcbaseva-BAMBOO_BASE_VA))*0.8); + gcmem_mixed_threshold = (unsigned int)((BAMBOO_SHARED_MEM_SIZE + -bamboo_reserved_smem*BAMBOO_SMEM_SIZE)*0.8); gcmem_mixed_usedmem = 0; #endif #ifdef GC_PROFILE_S