From: bdemsky Date: Sat, 26 Mar 2011 00:31:44 +0000 (+0000) Subject: fix various runtime bugs...most benchmarks running under rcr now X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0832f5e57ac5ec5612197952c407b346fcfd75bb;p=IRC.git fix various runtime bugs...most benchmarks running under rcr now --- diff --git a/Robust/src/IR/State.java b/Robust/src/IR/State.java index fe09c89b..50dc88e6 100644 --- a/Robust/src/IR/State.java +++ b/Robust/src/IR/State.java @@ -21,6 +21,7 @@ public class State { public static void initTimer() { startTime=System.nanoTime(); + lastTime=startTime; } public int lines; diff --git a/Robust/src/Runtime/garbage.c b/Robust/src/Runtime/garbage.c index 5197ca3d..944bd5d7 100644 --- a/Robust/src/Runtime/garbage.c +++ b/Robust/src/Runtime/garbage.c @@ -403,7 +403,7 @@ void collect(struct garbagelist * stackptr) { if (listptr==&litem) { #ifdef MLP // update forward list & memory queue for the current SESE - updateForwardList(((SESEcommon*)listptr->seseCommon)->forwardList,FALSE); + updateForwardList(&((SESEcommon*)listptr->seseCommon)->forwardList,FALSE); updateMemoryQueue((SESEcommon*)(listptr->seseCommon)); #endif listptr=listptr->next; @@ -436,8 +436,10 @@ void collect(struct garbagelist * stackptr) { #endif #ifdef MLP // update forward list & memory queue for all running SESEs. - updateForwardList(((SESEcommon*)listptr->seseCommon)->forwardList,FALSE); - updateMemoryQueue((SESEcommon*)(listptr->seseCommon)); + if (listptr->seseCommon!=NULL) { + updateForwardList(&((SESEcommon*)listptr->seseCommon)->forwardList,FALSE); + updateMemoryQueue((SESEcommon*)(listptr->seseCommon)); + } #endif stackptr=listptr->stackptr; listptr=listptr->next; @@ -581,13 +583,14 @@ void collect(struct garbagelist * stackptr) { // skip the current running SESE // continue; //} - + di=(dequeItem *) EXTRACTPTR((INTPTR)di); SESEcommon* seseRec = (SESEcommon*) di->work; + if (seseRec!=NULL) { struct garbagelist* gl = (struct garbagelist*) &(seseRec[1]); struct garbagelist* glroot = gl; - + updateAscendantSESE( seseRec ); - + while( gl != NULL ) { int k; for( k = 0; k < gl->size; k++ ) { @@ -596,7 +599,7 @@ void collect(struct garbagelist * stackptr) { } gl = gl->next; } - + } // we only have to move across the nodes // of the deque if the top and bottom are // not the same already diff --git a/Robust/src/Runtime/workschedule.c b/Robust/src/Runtime/workschedule.c index b59151a0..c730938e 100644 --- a/Robust/src/Runtime/workschedule.c +++ b/Robust/src/Runtime/workschedule.c @@ -242,6 +242,7 @@ void* workerMain( void* arg ) { #endif workFunc( workUnit ); + litem.seseCommon = NULL; } }