fix various runtime bugs...most benchmarks running under rcr now
authorbdemsky <bdemsky>
Sat, 26 Mar 2011 00:31:44 +0000 (00:31 +0000)
committerbdemsky <bdemsky>
Sat, 26 Mar 2011 00:31:44 +0000 (00:31 +0000)
Robust/src/IR/State.java
Robust/src/Runtime/garbage.c
Robust/src/Runtime/workschedule.c

index fe09c89bdfb4a4d5ef93c9dd3a7b28480914a1e8..50dc88e63ac1c17d055f45ae28c09bfc23aeddbe 100644 (file)
@@ -21,6 +21,7 @@ public class State {
 
   public static void initTimer() {
     startTime=System.nanoTime();
+    lastTime=startTime;
   }
 
   public int lines;
index 5197ca3d33b42dfeaeaa5eaa90bb004445dbc299..944bd5d7d8b466f83f91ed8dc9c6141e06b56f3a 100644 (file)
@@ -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
index b59151a07c05eefbd444cf85360df7fd88c8d4c4..c730938e00afcca6485bb5578f34d8ad7daa32e1 100644 (file)
@@ -242,6 +242,7 @@ void* workerMain( void* arg ) {
 #endif
 
       workFunc( workUnit );
+      litem.seseCommon = NULL;
     }
   }