Added code to include trace-projector
authorSayantan Chakravorty <sayantan_chak@yahoo.com>
Sun, 22 Dec 2002 13:54:11 +0000 (13:54 +0000)
committerSayantan Chakravorty <sayantan_chak@yahoo.com>
Sun, 22 Dec 2002 13:54:11 +0000 (13:54 +0000)
src/ck-perf/trace-all.C
src/ck-perf/trace-common.C
src/ck-perf/trace-projections.C
src/ck-perf/trace-projections.h

index ba8f9c10bd3822aff17ce7b40ecf6544f7909d68..4bcd93a9b7806f95cd9979f3f2bf44671800c60e 100644 (file)
@@ -1,10 +1,12 @@
 
 extern void _createTraceprojections(char **argv);
 extern void _createTracesummary(char **argv);
+extern void _createTraceprojector(char **argv);
 
 void _createTraceall(char **argv)
 {
   _createTraceprojections(argv);
   _createTracesummary(argv);
+  _createTraceprojector(argv);
 }
 
index 5a167e0f0a09dc54b82a788fffff8e64b419c041..bed4832fede80e5d0baecac7817efb254139a1f2 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "trace.h"
 #include "trace-common.h"
+#include "allEvents.h"          //projector
+CpvExtern(int, _traceCoreOn);   // projector
 
 #define DEBUGF(x)          // CmiPrintf x
 
@@ -49,9 +51,11 @@ static void traceCommonInit(char **argv)
   CkpvInitialize(double, traceInitTime);
   CkpvAccess(traceInitTime) = TRACE_TIMER();
   CpvInitialize(int, traceOn);
+  CpvInitialize(int, _traceCoreOn); //projector
   CkpvInitialize(int, CtrLogBufSize);
   CkpvInitialize(char*, traceRoot);
   CpvAccess(traceOn) = 0;
+  CpvAccess(_traceCoreOn)=0; //projector
 #if CMK_TRACE_IN_CHARM
   CkpvInitialize(int, traceOnPe);
   CkpvAccess(traceOnPe) = 1;
@@ -133,6 +137,7 @@ extern "C" void traceInit(char **argv)
 #if ! CMK_TRACE_IN_CHARM
   _traceInit(argv);
 #endif
+  initTraceCore(argv);
 }
 
 /// Charm++ version
@@ -159,6 +164,8 @@ void traceResume(CmiObjId *tid)
 #if ! CMK_TRACE_IN_CHARM
     CkpvAccess(_traces)->beginExecute(tid);
 #endif
+    if(CpvAccess(_traceCoreOn))
+           resumeTraceCore();
 }
 
 extern "C"
@@ -230,6 +237,7 @@ void traceClose(void)
   OPTIMIZE_WARNING
   CkpvAccess(_traces)->traceClose();
 #endif
+   closeTraceCore();
 }
 
 extern "C"
index b97cd430e2f4468309546938fea79b6d9812d5bf..3e99f59b047c21fefe10b495abc0e22c15dea150 100644 (file)
@@ -503,8 +503,10 @@ void TraceProjections::traceWriteSts(void)
 
 void TraceProjections::traceClose(void)
 {
-  if(CkMyPe()==0)
+  
+  if(CkMyPe()==0){
     _logPool->writeSts();
+  }
   if (TRACE_CHARM_PE()) {
     CkpvAccess(_trace)->endComputation();
     delete _logPool;           // will write
index f0bf402d551ec002d89d6567e3536446a6f883b5..75b2b7824340046de5f1c30c8c8ca9c6ec94208c 100644 (file)
@@ -23,6 +23,7 @@
 #endif
 
 #include "trace-common.h"
+#include "trace-projector.h"
 
 #define PROJECTION_VERSION  "4.0"