Charm++ Trace Module


Data Structures

class  TraceBluegene
class  StatTable
 track statistics for all entry points More...
class  CountLogPool
 counter log pool this implements functions for TraceCounter but that needed to be performed on a node-level More...
class  TraceCounter
 For each processor, TraceCounter calculates mean, stdev, etc of CPU performance counters for each entry point. More...
class  UsrEvent
struct  TraceThreadListener
class  LogEntry
 a log entry in trace projection More...
class  LogPool
 log pool in trace projection More...
class  StrKey
class  TraceProjections
 TraceProjections will log Converse/Charm++ events and write into .log files; events descriptions will be written into .sts file. More...
class  toProjectionsFile
class  fromProjectionsFile
class  toProjectionsGZFile
class  TraceRecordReplay
 TraceRecordReplay increments curEvent variable in the envelope everytime a message is executed. More...
class  BinEntry
 Bin entry record CPU time in an interval. More...
class  PhaseEntry
 a phase entry for trace summary More...
class  PhaseTable
 table of PhaseEntry More...
class  SumEntryInfo
 info for each entry More...
class  SumLogPool
 summary log pool More...
class  TraceSummary
 TraceSummary calculate CPU utilizations in bins, and will record number of calls and total wall time for each entry. More...
class  Trace
class  TraceArray
 Array of Traces modules, every event raised will go through every Trace module. More...

Typedefs

typedef void(*) mTFP ()
typedef CkVec< char * > usrEventVec
typedef void(*) sigfunc (int)
typedef long_long LONG_LONG_PAPI
typedef CMK_TYPEDEF_INT8 LONG_LONG_PAPI

Functions

void _createTracebluegene (char **argv)
static void writeData (void *data, double t, double recvT, void *ptr)
 CpvExtern (BGMach, bgMach)
void isomalloc_push ()
void isomalloc_pop ()
void BgPrintf (char *str)
void BgMark (char *str)
void BgSetStartEvent ()
 CkpvExtern (TraceBluegene *, _tracebg)
 CpvCExtern (int, _traceCoreOn)
 CkpvDeclare (TraceArray *, _traces)
 CkpvDeclare (TraceBluegene *, _tracebg)
 CkpvDeclare (double, traceInitTime)
 CkpvDeclare (double, traceInitCpuTime)
 CpvDeclare (int, traceOn)
 CkpvDeclare (int, traceOnPe)
 CkpvDeclare (char *, traceRoot)
 CkpvDeclare (bool, verbose)
 CpvStaticDeclare (mTFP, machineTraceFuncPtr)
static void traceCommonInit (char **argv)
 decide parameters from command line
 CkpvExtern (int, CtrLogBufSize)
 CkpvExtern (char *, traceRoot)
 CkpvExtern (bool, verbose)
 CkpvExtern (double, traceInitTime)
 CkpvExtern (double, traceInitCpuTime)
double TraceTimer ()
double TraceTimer (double t)
double TraceCpuTimer ()
double TraceCpuTimer (double t)
void traceWriteSTS (FILE *stsfp, int nUserEvents)
 Write out the common parts of the .sts file.
int start_counters (int e0, int e1)
int read_counters (int e0, long long *c0, int e1, long long *c1)
 CkpvStaticDeclare (Trace *, _trace)
 CpvStaticDeclare (CountLogPool *, _logPool)
 CpvStaticDeclare (char *, _logName)
 CpvStaticDeclare (char **, _counterNames)
 CpvStaticDeclare (char **, _counterDesc)
 CpvStaticDeclare (int, _numCounters)
 CpvStaticDeclare (int, _reductionID)
 CpvDeclare (double, version)
CmiHandler StatTableReduction (char *msg)
void _createTracecounter (char **argv)
 CkpvStaticDeclare (TraceProjections *, _trace)
 CtvStaticDeclare (int, curThreadEvent)
 CkpvDeclare (bool, useOutlierAnalysis)
 CkpvDeclare (int, CtrLogBufSize)
 CkpvStaticDeclare (usrEventVec, usrEventlist)
 UsrEvent::UsrEvent (int _e, char *_s)
 CkpvStaticDeclare (CkVec< UsrEvent * > *, usrEvents)
void _createTraceprojections (char **argv)
 For each TraceFoo module, _createTraceFoo() must be defined.
void traceThreadListener_suspend (struct CthThreadListener *l)
void traceThreadListener_resume (struct CthThreadListener *l)
void traceThreadListener_free (struct CthThreadListener *l)
static void updateProjLog (void *data, double t, double recvT, void *ptr)
void CombineProjections ()
void initTraceProjectionsBOC ()
 CkpvStaticDeclare (TraceRecordReplay *, _trace)
void _createTracerecordreplay (char **argv)
 For each TraceFoo module, _createTraceFoo() must be defined.
 CkpvStaticDeclare (sigfunc, segfault_sig)
void segfault_signal (int sig)
 CkpvStaticDeclare (TraceSummary *, _trace)
 CkpvDeclare (int, binCount)
 CkpvDeclare (double, binSize)
 CkpvDeclare (double, version)
void _createTracesummary (char **argv)
 For each TraceFoo module, _createTraceFoo() must be defined.
void CkSummary_StartPhase (int phase)
 function call for starting a phase in trace summary logs
void CkSummary_MarkEvent (int eventType)
 function call for adding an event mark
static void writeU (FILE *fp, int u)
void _CkExit ()
void CombineSummary ()
void initTraceSummaryBOC ()
void traceClearEps ()
double CmiTraceTimer ()
void traceAddThreadListeners (CthThread tid, envelope *e)
 CkpvExtern (int, traceOnPe)
 CkpvExtern (TraceArray *, _traces)
void TraceBluegene::writePrint (char *, double t)
 TraceBluegene::TraceBluegene (char **argv)
void TraceBluegene::traceClose ()
 TraceBluegene::~TraceBluegene ()
void TraceBluegene::creatFiles ()
void TraceBluegene::tlineEnd (void **parentLogPtr)
void TraceBluegene::bgAddTag (char *str)
void TraceBluegene::bgDummyBeginExec (char *name, void **parentLogPtr)
void TraceBluegene::bgBeginExec (char *msg, char *str)
void TraceBluegene::bgSetInfo (char *msg, char *str, void **logs, int count)
void TraceBluegene::bgAmpiBeginExec (char *msg, char *str, void **logs, int count)
void TraceBluegene::bgEndExec (int)
virtual void TraceBluegene::beginExecute (int event, int msgType, int ep, int srcPe, int mlen, CmiObjId *idx)
void TraceBluegene::getForwardDep (void *log, void **fDepPtr)
void TraceBluegene::getForwardDepForAll (void **logs1, void **logs2, int logsize, void *fDepPtr)
void TraceBluegene::addBackwardDep (void *log)
void TraceBluegene::userBracketEvent (char *name, double bt, double et, void **parentLogPtr)
void TraceBluegene::userBracketEvent (char *name, double bt, double et, void **parentLogPtr, CkVec< void * > bgLogList)
void TraceBluegene::bgPrint (char *str)
void TraceBluegene::bgMark (char *str)
 StatTable::StatTable ()
 StatTable::~StatTable ()
void StatTable::init (int argc)
void StatTable::setEp (int epidx, int stat, long long value, double time)
 one entry is called for 'time' seconds, value is counter reading
void StatTable::write (FILE *fp)
 write three lines for each stat: 1.
void StatTable::clear ()
 set all of internals to null
void StatTable::doReduction (int phase, double idleTime)
 do a reduction across processors to calculate the total count for each count, and if the count has flops, etc, then calc the the flops/s, etc.
 CountLogPool::CountLogPool ()
FILE * CountLogPool::openFile (int phase=-1)
void CountLogPool::write (int phase=-1)
void CountLogPool::writeSts (int phase=-1)
void CountLogPool::setEp (int epidx, int index1, long long count1, int index2, long long count2, double time)
 TraceCounter::TraceCounter ()
 constructor
 TraceCounter::~TraceCounter ()
 destructor
void TraceCounter::traceInit (char **argv)
 process command line arguments!
void TraceCounter::traceBegin ()
 turn trace on/off, note that charm will automatically call traceBegin() at the beginning of every run unless the command line option "+traceoff" is specified
void TraceCounter::traceEnd ()
 turn trace on/off, note that charm will automatically call traceBegin() at the beginning of every run unless the command line option "+traceoff" is specified
void TraceCounter::beginExecute (envelope *e)
 begin/end execution of a Charm++ entry point NOTE: begin/endPack and begin/endUnpack can be called in between a beginExecute and its corresponding endExecute.
void TraceCounter::beginExecute (int event, int msgType, int ep, int srcPe, int ml=0, CmiObjId *idx=0)
 begin/end execution of a Charm++ entry point NOTE: begin/endPack and begin/endUnpack can be called in between a beginExecute and its corresponding endExecute.
void TraceCounter::endExecute ()
 array idx
void TraceCounter::beginIdle (double curWallTime)
 begin/end idle time for this pe
void TraceCounter::endIdle (double curWallTime)
 begin/end idle time for this pe
void TraceCounter::beginPack ()
 begin/end the process of packing a message (to send)
void TraceCounter::endPack ()
 begin/end the process of packing a message (to send)
void TraceCounter::beginUnpack ()
 begin/end the process of unpacking a message (can occur before calling a entry point or during an entry point when
void TraceCounter::endUnpack ()
 begin/end the process of unpacking a message (can occur before calling a entry point or during an entry point when
void TraceCounter::beginComputation ()
 begin/end of execution
void TraceCounter::endComputation ()
 end computation, do a reduction here in hopes that it finishes before traceClose called and the program exits
void TraceCounter::traceClearEps ()
 clear all data collected for entry points
void TraceCounter::traceWriteSts ()
 write the summary sts file for this trace
void TraceCounter::traceClose ()
 do any clean-up necessary for tracing
void TraceCounter::beginOverview ()
 start/stop the overall counting ov eps (don't write to logCount, just print to screen
void TraceCounter::endOverview ()
void TraceCounter::switchCounters ()
 switch counters by whatever switching strategy
void TraceCounter::registerArg (CounterArg *arg)
 add the argument parameters to the linked list of args choices
bool TraceCounter::matchArg (CounterArg *arg)
 see if the arg (str or code) matches any in the linked list of choices and sets arg->code to the SGI code return true if arg matches, false otherwise
void TraceCounter::usage ()
 print out usage argument
void TraceCounter::printHelp ()
 print out all arguments in the linked-list of choices
virtual void TraceProjections::traceAddThreadListeners (CthThread tid, envelope *e)
void LogPool::openLog (const char *mode)
void LogPool::closeLog (void)
 LogPool::LogPool (char *pgm)
void LogPool::createFile (char *fix="")
void LogPool::createSts (char *fix="")
void LogPool::createRC ()
 LogPool::~LogPool ()
void LogPool::writeHeader ()
void LogPool::writeLog (void)
void LogPool::write (int writedelta)
void LogPool::writeSts (void)
void LogPool::writeSts (TraceProjections *traceProj)
void LogPool::writeRC (void)
void LogPool::flushLogBuffer ()
void LogPool::add (unsigned char type, unsigned short mIdx, unsigned short eIdx, double time, int event, int pe, int ml=0, CmiObjId *id=0, double recvT=0.0, double cpuT=0.0, int numPe=0)
void LogPool::add (unsigned char type, double time, unsigned short funcID, int lineNum, char *fileName)
void LogPool::addMemoryUsage (unsigned char type, double time, double memUsage)
void LogPool::addUserSupplied (int data)
 add a record for a user supplied piece of data
void LogPool::addCreationMulticast (unsigned short mIdx, unsigned short eIdx, double time, int event, int pe, int ml=0, CmiObjId *id=0, double recvT=0., int numPe=0, int *pelist=NULL)
void LogPool::postProcessLog ()
 LogEntry::LogEntry (double tm, unsigned short m, unsigned short e, int ev, int p, int ml, CmiObjId *d, double rt, int numPe, int *pelist)
 Constructor for a multicast log entry.
void LogEntry::addPapi (int numPapiEvts, int *papi_ids, LONG_LONG_PAPI *papiVals)
void LogEntry::pup (PUP::er &p)
 TraceProjections::TraceProjections (char **argv)
int TraceProjections::traceRegisterUserEvent (const char *, int)
void TraceProjections::traceClearEps ()
void TraceProjections::traceWriteSts ()
void TraceProjections::traceClose ()
void TraceProjections::closeTrace (void)
void TraceProjections::traceBegin ()
void TraceProjections::traceEnd ()
void TraceProjections::userEvent (int e)
void TraceProjections::userBracketEvent (int e, double bt, double et)
void TraceProjections::userSuppliedData (int e)
void TraceProjections::memoryUsage (double m)
void TraceProjections::creation (envelope *e, int epIdx, int num=1)
void TraceProjections::creationMulticast (envelope *e, int epIdx, int num=1, int *pelist=NULL)
void TraceProjections::creationDone (int num=1)
void TraceProjections::beginExecute (CmiObjId *tid)
void TraceProjections::beginExecute (envelope *e)
void TraceProjections::beginExecute (int event, int msgType, int ep, int srcPe, int ml, CmiObjId *idx=NULL)
void TraceProjections::endExecute (void)
void TraceProjections::messageRecv (char *env, int pe)
void TraceProjections::beginIdle (double curWallTime)
void TraceProjections::endIdle (double curWallTime)
void TraceProjections::beginPack (void)
void TraceProjections::endPack (void)
void TraceProjections::beginUnpack (void)
void TraceProjections::endUnpack (void)
void TraceProjections::enqueue (envelope *e)
void TraceProjections::dequeue (envelope *e)
void TraceProjections::beginComputation (void)
void TraceProjections::endComputation (void)
int TraceProjections::idxRegistered (int idx)
void TraceProjections::regFunc (const char *name, int &idx, int idxSpecifiedByUser=0)
void TraceProjections::beginFunc (char *name, char *file, int line)
void TraceProjections::beginFunc (int idx, char *file, int line)
void TraceProjections::endFunc (char *name)
void TraceProjections::endFunc (int num)
void TraceProjectionsBOC::shutdownAnalysis (void)
void TraceProjectionsBOC::startOutlierAnalysis ()
void TraceProjectionsBOC::outlierAverageReduction (CkReductionMsg *)
void TraceProjectionsBOC::calculateWeights (OutlierStatsMessage *)
void TraceProjectionsBOC::determineOutliers (OutlierWeightMessage *)
void TraceProjectionsBOC::setOutliers (OutlierThresholdMessage *)
void TraceProjectionsBOC::startEndTimeAnalysis ()
void TraceProjectionsBOC::endTimeReduction (CkReductionMsg *)
void TraceProjectionsBOC::finalReduction (CkReductionMsg *)
void TraceProjectionsBOC::closeTrace (void)
 TraceRecordReplay::TraceRecordReplay (char **argv)
void TraceRecordReplay::beginExecute (envelope *e)
void TraceRecordReplay::creation (envelope *e, int epIdx, int num=1)
 PhaseEntry::PhaseEntry ()
 SumLogPool::~SumLogPool ()
void SumLogPool::addEventType (int eventType, double time)
 SumLogPool::SumLogPool (char *pgm)
void SumLogPool::initMem ()
int SumLogPool::getUtilization (int interval, int ep)
void SumLogPool::write (void)
void SumLogPool::writeSts (void)
void SumLogPool::add (double time, int pe)
void SumLogPool::setEp (int epidx, double time)
void SumLogPool::updateSummaryDetail (int epIdx, double startTime, double endTime)
void SumLogPool::shrink (void)
int BinEntry::getU ()
void BinEntry::write (FILE *fp)
 TraceSummary::TraceSummary (char **argv)
void TraceSummary::traceClearEps ()
void TraceSummary::traceWriteSts ()
void TraceSummary::traceClose ()
void TraceSummary::beginExecute (CmiObjId *tid)
void TraceSummary::beginExecute (envelope *e)
void TraceSummary::beginExecute (int event, int msgType, int ep, int srcPe, int mlen=0, CmiObjId *idx=NULL)
void TraceSummary::endExecute (void)
void TraceSummary::beginPack (void)
void TraceSummary::endPack (void)
void TraceSummary::beginUnpack (void)
void TraceSummary::endUnpack (void)
void TraceSummary::beginComputation (void)
void TraceSummary::endComputation (void)
void TraceSummary::addEventType (int eventType)
 for trace summary event mark
void TraceSummary::startPhase (int phase)
 for starting a new phase
void TraceSummaryBOC::startSumOnly ()
void TraceSummaryBOC::askSummary (int size)
void TraceSummaryBOC::sendSummaryBOC (CkReductionMsg *)
void TraceSummaryBOC::write ()

Variables

int traceBluegeneLinked
static int warned = 0
int traceBluegeneLinked = 0
int _threadMsg
 Tracing-specific registered Charm entities:.
int _threadChare
int _threadEP
int _packMsg
int _packChare
int _packEP
int _unpackMsg
int _unpackChare
int _unpackEP
int _dummyMsg
int _dummyChare
int _dummyEP
int _threadMsg
 Tracing-specific registered Charm entities:.
int _threadChare
int _threadEP
int _packMsg
int _packChare
int _packEP
int _unpackMsg
int _unpackChare
int _unpackEP
int _dummyMsg
int _dummyChare
int _dummyEP
void(*)() registerMachineUserEvents ()
static const int NUM_EXTRA_PERF = 6
static int _numEvents = 0
static const int NUM_COUNTER_ARGS = 32
 The following is the list of arguments that can be passed to the +counter{1|2} command line arguments.
static TraceCounter::CounterArg COUNTER_ARG [NUM_COUNTER_ARGS]
int deltaLog
int nonDeltaLog
int checknested = 0
CkGroupID traceProjectionsGID
char * UsrEvent::str
static int warned = 0
int numPAPIEvents = 2
int papiEvents [] = { PAPI_L3_DCM, PAPI_FP_OPS }
char * papiEventNames [] = {"PAPI_L3_DCM", "PAPI_FP_OPS"}
int TraceThreadListener::event
int TraceThreadListener::msgType
int TraceThreadListener::ep
int TraceThreadListener::srcPe
int TraceThreadListener::ml
CmiObjId TraceThreadListener::idx
static int _numEvents = 0
int sumonly = 0
int sumDetail = 0
CkGroupID traceSummaryGID
 for TraceSummaryBOC
double epThreshold
double epInterval
int _dummyMsg
int _dummyChare
int _dummyEP

Typedef Documentation

typedef void(*) mTFP()

Definition at line 64 of file trace-common.C.

typedef CkVec<char *> usrEventVec

Definition at line 40 of file trace-projections.C.

typedef void(*) sigfunc(int)

Definition at line 37 of file trace-recordreplay.C.

typedef long_long LONG_LONG_PAPI

Definition at line 40 of file trace.h.

typedef CMK_TYPEDEF_INT8 LONG_LONG_PAPI

Definition at line 42 of file trace.h.


Function Documentation

void _createTracebluegene ( char **  argv  ) 

Definition at line 24 of file trace-bluegene.C.

References Converse::CkMyPe(), and traceBluegeneLinked.

static void writeData ( void *  data,
double  t,
double  recvT,
void *  ptr 
) [static]

Definition at line 35 of file trace-bluegene.C.

References TraceBluegene::writePrint().

Referenced by TraceBluegene::bgMark(), and TraceBluegene::bgPrint().

CpvExtern ( BGMach  ,
bgMach   
)

void isomalloc_push (  ) 

Definition at line 32 of file memory-isomalloc.c.

Referenced by TraceBluegene::bgPrint().

void isomalloc_pop (  ) 

Definition at line 39 of file memory-isomalloc.c.

Referenced by TraceBluegene::bgPrint().

void BgPrintf ( char *  str  ) 

Definition at line 233 of file trace-bluegene.C.

void BgMark ( char *  str  ) 

Definition at line 246 of file trace-bluegene.C.

void BgSetStartEvent (  ) 

Definition at line 251 of file trace-bluegene.C.

References genTimeLog, and BgTimeLog::setStartEvent().

CkpvExtern ( TraceBluegene ,
_tracebg   
)

CpvCExtern ( int  ,
_traceCoreOn   
)

CkpvDeclare ( TraceArray ,
_traces   
)

CkpvDeclare ( TraceBluegene ,
_tracebg   
)

CkpvDeclare ( double  ,
traceInitTime   
)

CkpvDeclare ( double  ,
traceInitCpuTime   
)

CpvDeclare ( int  ,
traceOn   
)

CkpvDeclare ( int  ,
traceOnPe   
)

CkpvDeclare ( char *  ,
traceRoot   
)

CkpvDeclare ( bool  ,
verbose   
)

CpvStaticDeclare ( mTFP  ,
machineTraceFuncPtr   
)

static void traceCommonInit ( char **  argv  )  [static]

decide parameters from command line

Write out the common parts of the .sts file.

defined in moduleInit.C

traceInit: called at Converse level traceCharmInit: called at Charm++ level

initialize trace framework, also create the trace module(s).

Converse version

Charm++ version

traceClose: this function is called at Converse traceCharmClose: called at Charm++ level

Definition at line 74 of file trace-common.C.

References _chareTable, _charmHandlerIdx, _dummyChare, _dummyEP, _dummyMsg, _entryTable, _msgTable, _packChare, _packEP, _packMsg, _processHandler(), _threadChare, _threadEP, _threadMsg, _unpackChare, _unpackEP, _unpackMsg, TraceBluegene::beginExecute(), Trace::beginFunc(), BGConverse::BgNodeRank(), BgTraceProjectionOn(), TraceArray::cancel_beginIdle, TraceArray::cancel_endIdle, CcdCallOnConditionKeep(), CcdCancelCallOnConditionKeep(), BGConverse::CkMyNodeSize(), Converse::CkMyPe(), BGConverse::CkMyRank(), Converse::CkNumPes(), CkRegisterChare(), CkRegisterChareInCharm(), CkRegisterEp(), CkRegisterMsg(), CmiArgGroup(), CmiGetArgFlag(), CmiGetArgFlagDesc(), CmiGetArgStringDesc(), CmiMemoryUsage(), CmiPrintf(), CmiRankOf(), CmiStartTimer(), CmiTraceTimer(), TraceArray::creation(), TraceArray::creationMulticast(), Trace::endExecute(), Trace::endFunc(), CkListString::includes(), initTraceCore(), length, malloc(), TraceArray::n, registerMachineUserEvents, registerMachineUserEventsFunction(), resumeTraceCore(), size, traceAddThreadListeners(), traceAvailable(), traceAwaken(), traceBegin(), TraceArray::traceBegin(), traceBeginFuncIndexProj(), traceBeginFuncProj(), traceCharmClose(), traceCharmInit(), traceClearEps(), traceClose(), traceEnd(), TraceArray::traceEnd(), traceEndFuncIndexProj(), traceEndFuncProj(), traceFlushLog(), traceInit(), traceMemoryUsage(), traceMessageRecv(), TraceBluegene::traceOnPE(),