TraceCounter Class Reference
[Charm++ Trace Module]

For each processor, TraceCounter calculates mean, stdev, etc of CPU performance counters for each entry point. More...

#include <trace-counter.h>

Inheritance diagram for TraceCounter:

Inheritance graph
[legend]
Collaboration diagram for TraceCounter:

Collaboration graph
[legend]

Public Member Functions

 TraceCounter ()
 constructor
 ~TraceCounter ()
 destructor
void traceInit (char **argv)
 process command line arguments!
void 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 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
int traceRegisterUserEvent (const char *userEvent)
 registers user event trace module returns int identifier
void userEvent (int e)
 a user event has just occured
void creation (envelope *e, int epIdx, int num=1)
 creation of message(s)
void messageRecv (char *env, int pe)
 ???
void 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 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 endExecute ()
 array idx
void beginIdle (double curWallTime)
 begin/end idle time for this pe
void endIdle (double curWallTime)
 begin/end idle time for this pe
void beginPack ()
 begin/end the process of packing a message (to send)
void endPack ()
 begin/end the process of packing a message (to send)
void beginUnpack ()
 begin/end the process of unpacking a message (can occur before calling a entry point or during an entry point when
void endUnpack ()
 begin/end the process of unpacking a message (can occur before calling a entry point or during an entry point when
void enqueue (envelope *e)
 ???
void dequeue (envelope *e)
void beginComputation ()
 begin/end of execution
void endComputation ()
 end computation, do a reduction here in hopes that it finishes before traceClose called and the program exits
void traceClearEps ()
 clear all data collected for entry points
void traceWriteSts ()
 write the summary sts file for this trace
void traceClose ()
 do any clean-up necessary for tracing

Private Types

enum  TC_Status { IDLE, WORKING }

Private Member Functions

void beginOverview ()
 start/stop the overall counting ov eps (don't write to logCount, just print to screen
void endOverview ()
void switchCounters ()
 switch counters by whatever switching strategy
void registerArg (CounterArg *arg)
 add the argument parameters to the linked list of args choices
bool 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 usage ()
 print out usage argument
void printHelp ()
 print out all arguments in the linked-list of choices

Private Attributes

int cancel_beginIdle
int cancel_endIdle
CounterArgfirstArg_
CounterArglastArg_
int argStrSize_
CounterArgcommandLine_
int commandLineSz_
CounterArgcounter1_
CounterArgcounter2_
int counter1Sz_
int counter2Sz_
bool overview_
bool switchRandom_
bool switchByPhase_
bool noLog_
bool writeByPhase_
int execEP_
double startEP_
double startIdle_
int genStart_
double idleTime_
int phase_
int reductionPhase_
bool traceOn_
TC_Status status_
bool dirty_

Data Structures

struct  CounterArg
 CounterArg is a linked list of strings that allows processing of command line args. More...

Detailed Description

For each processor, TraceCounter calculates mean, stdev, etc of CPU performance counters for each entry point.

Definition at line 98 of file trace-counter.h.


Member Enumeration Documentation

enum TraceCounter::TC_Status [private]

Enumerator:
IDLE 
WORKING 

Definition at line 176 of file trace-counter.h.


Member Function Documentation

int TraceCounter::traceRegisterUserEvent ( const char *  userEvent  )  [inline]

registers user event trace module returns int identifier

Definition at line 110 of file trace-counter.h.

void TraceCounter::userEvent ( int  e  )  [inline, virtual]

a user event has just occured

Reimplemented from Trace.

Definition at line 116 of file trace-counter.h.

void TraceCounter::creation ( envelope e,
int  epIdx,
int  num = 1 
) [inline, virtual]

creation of message(s)

Reimplemented from Trace.

Definition at line 120 of file trace-counter.h.

void TraceCounter::messageRecv ( char *  env,
int  pe 
) [inline, virtual]

???

Reimplemented from Trace.

Definition at line 122 of file trace-counter.h.

void TraceCounter::enqueue ( envelope e  )  [inline, virtual]

???

Reimplemented from Trace.

Definition at line 146 of file trace-counter.h.

void TraceCounter::dequeue ( envelope e  )  [inline, virtual]

Reimplemented from Trace.

Definition at line 147 of file trace-counter.h.


Field Documentation

int TraceCounter::cancel_beginIdle [private]

Definition at line 177 of file trace-counter.h.

int TraceCounter::cancel_endIdle [private]

Definition at line 177 of file trace-counter.h.

CounterArg* TraceCounter::firstArg_ [private]

Definition at line 180 of file trace-counter.h.

Referenced by matchArg(), printHelp(), and registerArg().

CounterArg* TraceCounter::lastArg_ [private]

Definition at line 181 of file trace-counter.h.

Referenced by registerArg().

int TraceCounter::argStrSize_ [private]

Definition at line 182 of file trace-counter.h.

Referenced by printHelp(), and registerArg().

CounterArg* TraceCounter::commandLine_ [private]

Definition at line 183 of file trace-counter.h.

Referenced by traceInit(), and ~TraceCounter().

int TraceCounter::commandLineSz_ [private]

Definition at line 184 of file trace-counter.h.

Referenced by traceInit().

CounterArg* TraceCounter::counter1_ [private]

Definition at line 185 of file trace-counter.h.

Referenced by beginOverview(), endExecute(), endOverview(), switchCounters(), and traceInit().

CounterArg* TraceCounter::counter2_ [private]

Definition at line 186 of file trace-counter.h.

Referenced by beginOverview(), endExecute(), endOverview(), switchCounters(), and traceInit().

int TraceCounter::counter1Sz_ [private]

Definition at line 187 of file trace-counter.h.

Referenced by traceInit().

int TraceCounter::counter2Sz_ [private]

Definition at line 188 of file trace-counter.h.

Referenced by traceInit().

bool TraceCounter::overview_ [private]

Definition at line 191 of file trace-counter.h.

Referenced by endExecute(), traceBegin(), traceClose(), traceEnd(), and traceInit().

bool TraceCounter::switchRandom_ [private]

Definition at line 192 of file trace-counter.h.

Referenced by switchCounters(), and traceInit().

bool TraceCounter::switchByPhase_ [private]

Definition at line 193 of file trace-counter.h.

Referenced by endExecute(), traceEnd(), and traceInit().

bool TraceCounter::noLog_ [private]

Definition at line 194 of file trace-counter.h.

Referenced by traceClose(), traceEnd(), traceInit(), and traceWriteSts().

bool TraceCounter::writeByPhase_ [private]

Definition at line 195 of file trace-counter.h.

Referenced by traceBegin(), traceEnd(), and traceInit().

int TraceCounter::execEP_ [private]

Definition at line 198 of file trace-counter.h.

Referenced by endExecute().

double TraceCounter::startEP_ [private]

Definition at line 199 of file trace-counter.h.

Referenced by beginOverview(), endExecute(), and endOverview().

double TraceCounter::startIdle_ [private]

Definition at line 200 of file trace-counter.h.

Referenced by beginIdle(), and endIdle().

int TraceCounter::genStart_ [private]

Definition at line 201 of file trace-counter.h.

Referenced by beginOverview(), endExecute(), and endOverview().

double TraceCounter::idleTime_ [private]

Definition at line 204 of file trace-counter.h.

Referenced by endComputation(), endIdle(), endOverview(), traceBegin(), and traceEnd().

int TraceCounter::phase_ [private]

Definition at line 205 of file trace-counter.h.

Referenced by endOverview(), traceBegin(), and traceEnd().

int TraceCounter::reductionPhase_ [private]

Definition at line 206 of file trace-counter.h.

Referenced by traceEnd().

bool TraceCounter::traceOn_ [private]

Definition at line 207 of file trace-counter.h.

Referenced by beginIdle(), endExecute(), endIdle(), traceBegin(), traceEnd(), and traceWriteSts().

TC_Status TraceCounter::status_ [private]

Definition at line 208 of file trace-counter.h.

Referenced by endExecute().

bool TraceCounter::dirty_ [private]

Definition at line 209 of file trace-counter.h.

Referenced by beginOverview(), endExecute(), endOverview(), traceClose(), and traceEnd().


The documentation for this class was generated from the following files:
Generated on Sun Jun 29 13:35:42 2008 for Charm++ by  doxygen 1.5.1