tracer.c File Reference

#include "tracer.h"

Include dependency graph for tracer.c:

Go to the source code of this file.

Functions

TrcDatatrcCreateData (char *filename)
 Starts the tracing data, zeroing everything.
void trcDestroyData (TrcData **trcPointer)
 Destroys the Tracing data, NULLing the pointer.
void trcEnterState (TrcData *trc, char *types,...)
 Enters a specific state, setting the values of the attributes.
void trcResetCurrentState (TrcData *trc)
 Reset the initial time of the current state, as if trcEnterState was called again ( but no other state is created ).
void trcLeaveState (TrcData *trc,...)
 leaves the current state, computing times for it.
void trcFlush (TrcData *trc)
 Saves all tracing data to a file, appending time there.
int * trcIArrayToTrc (int size, int *array)


Function Documentation

TrcData* trcCreateData char *  filename  ) 
 

Starts the tracing data, zeroing everything.

Returns:
the tracing data created

Definition at line 3 of file tracer.c.

References _TrcData_::currentState, _TrcData_::firstFlush, _TrcData_::initTime, listCreate(), _TrcData_::numSavedStates, _TrcData_::numStackedStates, _TrcData_::savedStates, _TrcData_::stackedStates, stCreate(), and _TrcData_::tracefile.

Referenced by createFilterData().

Here is the call graph for this function:

void trcDestroyData TrcData **  trcPointer  ) 
 

Destroys the Tracing data, NULLing the pointer.

Parameters:
trcPointer the address of the Tracing data pointer, which will be NULL after this call

Definition at line 24 of file tracer.c.

References trcFlush(), and trcLeaveState().

Referenced by dsExit().

Here is the call graph for this function:

void trcEnterState TrcData trc,
char *  types,
  ...
 

Enters a specific state, setting the values of the attributes.

Parameters:
id = a pointer to an TrcData structure returned by a previous trcCreateData call;
types = a null terminated string of length = numAttributes specifying the types of the incoming attributes, as above: i = fixed integer s = fixed string

Definition at line 53 of file tracer.c.

References _TrcState_::numAttributes, and _TrcState_::numPosAttributes.

Referenced by dsCloseOutputPort(), dsCreateTask(), dsEndTask(), dsExit(), dsGetCurrentTask(), dsGetInputPortByName(), dsGetLocalInstances(), dsGetMachineMemory(), dsGetMyRank(), dsGetNumReaders(), dsGetNumWriters(), dsGetOutputPortByName(), dsGetTotalInstances(), dsInitPack(), dsInitReceive(), dsPackData(), dsProbe(), dsReadBuffer(), dsReadNonBlockingBuffer(), dsSetCurrentTask(), dsUnpackData(), dsWriteBuffer(), and dsWritePackedBuffer().

void trcFlush TrcData trc  ) 
 

Saves all tracing data to a file, appending time there.

Parameters:
filename the name of the file to save
label a label to write with the timing results

Definition at line 254 of file tracer.c.

References _TrcData_::firstFlush, _TrcData_::initTime, listRemoveHead(), _TrcData_::numSavedStates, _TrcData_::savedStates, SEPARATOR, and _TrcData_::tracefile.

Referenced by trcDestroyData().

Here is the call graph for this function:

int* trcIArrayToTrc int  size,
int *  array
 

Definition at line 288 of file tracer.c.

void trcLeaveState TrcData trc,
  ...
 

leaves the current state, computing times for it.

The current state is set to the Top of the stack, which is poped

Parameters:
trc Pointer to tracing data

Definition at line 130 of file tracer.c.

References _TrcState_::attributes, _TrcData_::currentState, _TrcState_::endRusage, _TrcState_::endTime, _TrcState_::numAttributes, _TrcState_::numPosAttributes, _TrcData_::numStackedStates, _TrcData_::stackedStates, stPop(), _TrcAttribute_::type, and _TrcAttribute_::value.

Referenced by dsCloseOutputPort(), dsCreateTask(), dsEndTask(), dsExit(), dsGetCurrentTask(), dsGetInputPortByName(), dsGetLocalInstances(), dsGetMachineMemory(), dsGetMyRank(), dsGetNumReaders(), dsGetNumWriters(), dsGetOutputPortByName(), dsGetTotalInstances(), dsInitPack(), dsInitReceive(), dsPackData(), dsProbe(), dsReadBuffer(), dsReadNonBlockingBuffer(), dsSetCurrentTask(), dsUnpackData(), dsWriteBuffer(), dsWritePackedBuffer(), and trcDestroyData().

Here is the call graph for this function:

void trcResetCurrentState TrcData trc  ) 
 

Reset the initial time of the current state, as if trcEnterState was called again ( but no other state is created ).

Parameters:
trc Pointer to tracing data

Definition at line 125 of file tracer.c.

References _TrcData_::currentState, and _TrcState_::initTime.

Referenced by dsReadBuffer().


Generated on Tue Jan 17 19:28:16 2006 for Void by  doxygen 1.4.6