implemented BgSetStartEvent() to mark an event in the middle of run as the beginning...
authorGengbin Zheng <gzheng@illinois.edu>
Thu, 24 Jun 2004 21:31:14 +0000 (21:31 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Thu, 24 Jun 2004 21:31:14 +0000 (21:31 +0000)
src/ck-perf/trace-bluegene.C
src/ck-perf/trace-bluegene.h

index 304039468925fa14b63f2244f2815813b8ca955b..cdfac3e97f8b6bf631beccc75f8f9326b6cd12ce 100644 (file)
@@ -82,10 +82,7 @@ void TraceBluegene::bgDummyBeginExec(char* name,void** parentLogPtr)
 {
   if (!genTimeLog) return;
   startVTimer();
-  bgTimeLog* newLog = new bgTimeLog(_threadEP,name,BgGetCurTime());
-  if(*parentLogPtr)
-    newLog->addBackwardDep(*(bgTimeLog**)parentLogPtr);
-  tTIMELINEREC.logEntryStart(newLog);
+  bgTimeLog* newLog = BgStartLogByName(tTIMELINEREC, _threadEP, name, BgGetCurTime(), *(bgTimeLog**)parentLogPtr);
   *parentLogPtr = newLog;
 }
 
@@ -194,5 +191,15 @@ extern "C" void BgPrintf(char *str)
   BgPrint(str);
 }
 
+extern "C" void BgSetStartEvent()
+{
+  bgTimeLog* log;
+  if(genTimeLog)
+    log = tTIMELINE[tTIMELINE.length()-1];
+  else
+    return;
+  log->setStartEvent();
+}
+
 /*@}*/
 
index 560a176fadd9ca8d82548de38ec27aef7a835002..280cda9a063d15c5164b51187c7441d98cab6e9a 100644 (file)
@@ -100,6 +100,7 @@ extern int traceBluegeneLinked;
          _TRACE_BG_ADD_BACKWARD_DEP(log);      \
         }      \
        }
+extern "C" void BgSetStartEvent();
 #else
 # define BgPrint(x)  
 # define _TRACE_BG_TLINE_END(x)