change
authorjihoonl <jihoonl>
Fri, 15 Jan 2010 01:13:58 +0000 (01:13 +0000)
committerjihoonl <jihoonl>
Fri, 15 Jan 2010 01:13:58 +0000 (01:13 +0000)
Robust/src/IR/Flat/BuildCode.java
Robust/src/Runtime/DSTM/interface_recovery/trans.c

index f423bb989b5d896bb8f7699c6c2b3708e30d55c2..ac52e6b68e8981d56e019395ac6eb39be77a685d 100644 (file)
@@ -415,13 +415,12 @@ public class BuildCode {
     if(state.DSMRECOVERYSTATS) {
       outmethod.println("#ifdef RECOVERYSTATS\n");
       outmethod.println("printf(\"***** Recovery Stats *****\\n\");");
-      outmethod.println("printf(\"numRecovery = %d\\n\",numRecovery)");
+      outmethod.println("printf(\"numRecovery = %d\\n\",numRecovery);");
       outmethod.println("int nRecovery=0;");
       outmethod.println("for(nRecovery=0;nRecovery<numRecovery;nRecovery++) {");
-      outmethod.println("  printf(\"Dead Machine = %s\\n\",deadMachine[nRecovery]);");
+      outmethod.println("  printf(\"Dead Machine = %s\\n\",midtoIPString(deadMachine[nRecovery]));");
       outmethod.println("  printf(\"Recovery Time = %.2f\\n\",elapsedTime[nRecovery]);");
-      outmethod.println(" }\n");
-      outmethod.println("fflush(stdout);");
+      outmethod.println("}\n");
       outmethod.println("#endif\n");
     }
 
index fac3777bfe22c32afb6655fccc688945a6d1b408..071430df35264552a4244a383552cb437aacb5dd 100644 (file)
@@ -2513,9 +2513,10 @@ void duplicateLostObjects(unsigned int mid){
 #ifdef RECOVERYSTATS
   printf("Recovery Start\n");
   numRecovery++;
-  time_t st = time(NULL);
+  time_t st;
   time_t fi;
 
+  time(&st);
   deadMachine[numRecovery-1] = mid;
 #endif
 
@@ -2604,8 +2605,8 @@ void duplicateLostObjects(unsigned int mid){
        }
 
 #ifdef RECOVERYSTATS
-  fi = time(NULL);
-  elapsedTime[numRecovery-1] = fi-st;
+  time(&fi);
+  elapsedTime[numRecovery-1] = difftime(fi,st);
 #endif
 
 #ifndef DEBUG