Bug #1429: Provide explicit new/delete overloads on darwin for memory modules.
[charm.git] / src / ck-perf / trace-simple.h
blob5138996057fc4a8e61a6030a2d19a1894f4f203c
1 #ifndef _VERBOSE_H
2 #define _VERBOSE_H
4 #include <stdio.h>
5 #include <errno.h>
7 #include "trace.h"
8 #include "envelope.h"
9 #include "register.h"
10 #include "trace-common.h"
12 /**
13 * TraceSimple is a template for an instrumentation module making use of
14 * the tracing framework hooks provided in Charm++.
16 * Only the more common hooks are listened to in this module.
18 class TraceSimple : public Trace {
19 public:
20 int par0;
21 double par1;
22 public:
23 TraceSimple(char **argv);
25 // a user event has just occured
26 void userEvent(int eventID);
27 // a pair of begin/end user event has just occured
28 void userBracketEvent(int eventID, double bt, double et);
30 // "creation" of message(s) - message Sends
31 void creation(envelope *, int epIdx, int num=1);
32 void creation(char *msg) {}
33 void creationMulticast(envelope *, int epIdx, int num=1, int *pelist=NULL);
34 void creationDone(int num=1);
36 void messageRecv(char *env, int pe);
38 // **************************************************************
39 // begin/end execution of a Charm++ entry point
40 // NOTE: begin/endPack and begin/endUnpack can be called in between
41 // a beginExecute and its corresponding endExecute.
42 void beginExecute(envelope *, void*);
43 void beginExecute(char *) {}
44 void beginExecute(CmiObjId *tid);
45 void beginExecute(
46 int event, // event type defined in trace-common.h
47 int msgType, // message type
48 int ep, // Charm++ entry point id
49 int srcPe, // Which PE originated the call
50 int ml, // message size
51 CmiObjId* idx, // index
52 void* obj);
53 void endExecute(void);
55 // begin/end idle time for this pe
56 void beginIdle(double curWallTime);
57 void endIdle(double curWallTime);
59 // begin/end of execution
60 void beginComputation(void);
61 void endComputation(void);
63 /* Memory tracing */
64 void malloc(void *where, int size, void **stack, int stackSize);
65 void free(void *where, int size);
67 // do any clean-up necessary for tracing
68 void traceClose();
71 #endif
73 /*@}*/