Adding some BGP UPC preliminary performance counter support for use in
[charm.git] / src / ck-perf / trace-controlPointsBOC.h
1 #include "TraceControlPoints.decl.h"
2
3 extern CkGroupID traceControlPointsGID;
4
5 void initBGP_UPC_Counters(void);
6
7 // We typically declare parallel object classes here for the purposes of
8 // performing parallel operations for the trace module after the main
9 // application has completed execution (and calls CkExit()).
10 //
11 // TraceControlPointsInit is an initialization class.
12 //
13 // TraceControlPointsBOC is a one-per-processor object (defined in the .ci file as
14 //    a "group" instead of a "chare") which hosts the methods for the
15 //    parallel operations. In this case, there are no methods defined.
16 //    Otherwise, one may write any Charm++ code here.
17
18 class TraceControlPointsInit : public Chare {
19   public:
20   TraceControlPointsInit(CkArgMsg*) {
21     traceControlPointsGID = CProxy_TraceControlPointsBOC::ckNew();
22     CProxy_TraceControlPointsBOC controlPointsProxy(traceControlPointsGID);
23     CkPrintf("Initializing counters on pe %d\n", CkMyPe());
24    
25   }
26   TraceControlPointsInit(CkMigrateMessage *m):Chare(m) {}
27 };
28
29 class TraceControlPointsBOC : public CBase_TraceControlPointsBOC {
30 public:
31   TraceControlPointsBOC(void) {
32       initBGP_UPC_Counters();
33   };
34   TraceControlPointsBOC(CkMigrateMessage *m) {};
35
36   void printBGP_UPC_CountersBOC(void);
37
38 };
39
40