LAMA
tracing::TraceRegionRecord Class Reference

#include <TraceRegionRecord.hpp>

Inheritance diagram for tracing::TraceRegionRecord:

Public Member Functions

 TraceRegionRecord (const char *regionName, const char *fileName, int lno)
 Constructor of a tracer object, produces 'start' entry in trace file.
 TraceRegionRecord (const char *regionName, int n, const char *fileName, int lno)
 Same as before but additional integer value that is used as suffix for region name.
 ~TraceRegionRecord ()
 Destructor of a tracer object, produces 'stop' entry in trace file.
void setRuntime (const double runTime)

Static Public Member Functions

static double spentLast (const char *regionName)
 Query for the inclusive time spent for the last call of a region.
static void start (const char *regionName, const char *file, int lno)
 Generate only a 'start region' entry in trace file.
static void stop (const char *regionName)
 Generate only a 'end region' entry in trace file.

Protected Member Functions

double getRuntime () const

Private Member Functions

 LAMA_LOG_DECL_STATIC_LOGGER (logger)
void enter (const char *regionName, const char *file, int lno)
 Common routine used in all constructors.

Private Attributes

boost::shared_ptr< class
TraceConfig
mTraceConfig
 Each region timing keeps a shared pointer to the configuration.
class RegionTablemRegionTable
int mRegionId
bool mTimeTrace
 set to true if timing should be done
bool mVampirTrace
 set to true if Vampir trace should be done
double mStartTime
 walltime of region start

Constructor & Destructor Documentation

tracing::TraceRegionRecord::TraceRegionRecord ( const char *  regionName,
const char *  fileName,
int  lno 
)

Constructor of a tracer object, produces 'start' entry in trace file.

Parameters:
[in]regionNamename of the region, must be unique in application
[in]fileNamename of the file in which region is coded
[out]lnoline number in file where the region starts

References enter(), tracing::TraceConfig::getInstancePtr(), mRegionTable, and mTraceConfig.

tracing::TraceRegionRecord::TraceRegionRecord ( const char *  regionName,
int  n,
const char *  fileName,
int  lno 
)

Same as before but additional integer value that is used as suffix for region name.

References enter(), tracing::TraceConfig::getInstancePtr(), mRegionTable, and mTraceConfig.


Member Function Documentation

void tracing::TraceRegionRecord::enter ( const char *  regionName,
const char *  file,
int  lno 
) [private]
double LAMABaseTracer::getRuntime ( ) const [protected, inherited]
void LAMABaseTracer::setRuntime ( const double  runTime) [inherited]
double tracing::TraceRegionRecord::spentLast ( const char *  regionName) [static]

Query for the inclusive time spent for the last call of a region.

Parameters:
[in]regionNamename of the region that is queried
Returns:
inclusive time spent for the last call of region

This method must not be called within the region itself, i.e. region must not be on the current call stack.

References tracing::TraceConfig::getInstance(), tracing::RegionTable::getName(), tracing::RegionTable::getRegion(), tracing::TraceConfig::getRegionTable(), and tracing::RegionTable::spentLast().

void tracing::TraceRegionRecord::start ( const char *  regionName,
const char *  file,
int  lno 
) [static]
void tracing::TraceRegionRecord::stop ( const char *  regionName) [static]

Field Documentation

walltime of region start

Referenced by enter().

set to true if timing should be done

Referenced by enter(), and ~TraceRegionRecord().

boost::shared_ptr<class TraceConfig> tracing::TraceRegionRecord::mTraceConfig [private]

Each region timing keeps a shared pointer to the configuration.

By this way it is guaranteed that timer information is only printed when all timings even of running threads are finished.

Referenced by enter(), and TraceRegionRecord().

set to true if Vampir trace should be done

Referenced by enter(), and ~TraceRegionRecord().


The documentation for this class was generated from the following files: