10 #include "trace-common.h"
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
{
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
);
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
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);
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