prevent some of the log generation cost being count as user entry time
authorGengbin Zheng <gzheng@illinois.edu>
Mon, 15 Jun 2009 16:46:20 +0000 (16:46 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Mon, 15 Jun 2009 16:46:20 +0000 (16:46 +0000)
src/ck-perf/trace-bluegene.C

index 4ee2e7bf9f6e5deba0d69183835c7fce37ca2c0c..eb13fb517f3fb3a1799dcb4587c39311d7defccd 100644 (file)
@@ -89,8 +89,7 @@ void TraceBluegene::bgAddTag(const char* str){
 
 void TraceBluegene::bgDummyBeginExec(const char* name,void** parentLogPtr, int split)
 {
-  startVTimer();
-  if (!genTimeLog) return;
+  if (genTimeLog) {
   CmiAssert(parentLogPtr!=NULL);
   double startTime = BgGetCurTime();
   BgTimeLog* newLog = BgStartLogByName(tTIMELINEREC, _threadEP, name, startTime, *(BgTimeLog**)parentLogPtr);
@@ -101,6 +100,8 @@ void TraceBluegene::bgDummyBeginExec(const char* name,void** parentLogPtr, int s
   else
     if (split) newLog->objId = (*(BgTimeLog**)parentLogPtr)->objId;
   *parentLogPtr = newLog;
+  }
+  startVTimer();
 }
 
 void TraceBluegene::bgBeginExec(char* msg, char *name)
@@ -205,9 +206,11 @@ void TraceBluegene::getForwardDepForAll(void** logs1, void** logs2, int logsize,
 void TraceBluegene::addBackwardDep(void *log)
 {
   if(!genTimeLog || log==NULL) return;
+  double curT = BgGetTime();
   BgTimeLog  *parentLogPtr = BgLastLog(tTIMELINEREC);
   CmiAssert(parentLogPtr);
   BgAddBackwardDep(parentLogPtr, (BgTimeLog*)log);
+  resetVTime();     // bypass this time
 }
 
 void TraceBluegene::userBracketEvent(const char* name, double bt, double et, void** parentLogPtr){