LAMA
|
#include <TraceRegionRecord.hpp>
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 RegionTable * | mRegionTable |
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 |
tracing::TraceRegionRecord::TraceRegionRecord | ( | const char * | regionName, |
const char * | fileName, | ||
int | lno | ||
) |
Constructor of a tracer object, produces 'start' entry in trace file.
[in] | regionName | name of the region, must be unique in application |
[in] | fileName | name of the file in which region is coded |
[out] | lno | line 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.
Destructor of a tracer object, produces 'stop' entry in trace file.
References tracing::RegionTable::getId(), tracing::RegionTable::getName(), tracing::getWallTime(), mRegionId, mRegionTable, mTimeTrace, mVampirTrace, and tracing::RegionTable::stop().
void tracing::TraceRegionRecord::enter | ( | const char * | regionName, |
const char * | file, | ||
int | lno | ||
) | [private] |
Common routine used in all constructors.
References tracing::RegionTable::getId(), tracing::RegionTable::getName(), tracing::RegionTable::getRegion(), tracing::getWallTime(), mRegionId, mRegionTable, mStartTime, mTimeTrace, mTraceConfig, mVampirTrace, and tracing::RegionTable::start().
Referenced by TraceRegionRecord().
double LAMABaseTracer::getRuntime | ( | ) | const [protected, inherited] |
References LAMABaseTracer::mRunTime.
Referenced by LAMASimpleTimeTracer::~LAMASimpleTimeTracer().
tracing::TraceRegionRecord::LAMA_LOG_DECL_STATIC_LOGGER | ( | logger | ) | [private] |
void LAMABaseTracer::setRuntime | ( | const double | runTime | ) | [inherited] |
References LAMABaseTracer::mRunTime.
double tracing::TraceRegionRecord::spentLast | ( | const char * | regionName | ) | [static] |
Query for the inclusive time spent for the last call of a region.
[in] | regionName | name of the region that is queried |
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] |
Generate only a 'start region' entry in trace file.
References tracing::RegionTable::getId(), tracing::TraceConfig::getInstancePtr(), tracing::RegionTable::getName(), tracing::RegionTable::getRegion(), tracing::getWallTime(), and tracing::RegionTable::start().
void tracing::TraceRegionRecord::stop | ( | const char * | regionName | ) | [static] |
Generate only a 'end region' entry in trace file.
References tracing::RegionTable::getId(), tracing::TraceConfig::getInstancePtr(), tracing::getWallTime(), and tracing::RegionTable::stop().
int tracing::TraceRegionRecord::mRegionId [private] |
Referenced by enter(), and ~TraceRegionRecord().
class RegionTable* tracing::TraceRegionRecord::mRegionTable [private] |
Referenced by enter(), TraceRegionRecord(), and ~TraceRegionRecord().
double tracing::TraceRegionRecord::mStartTime [private] |
walltime of region start
Referenced by enter().
bool tracing::TraceRegionRecord::mTimeTrace [private] |
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().
bool tracing::TraceRegionRecord::mVampirTrace [private] |
set to true if Vampir trace should be done
Referenced by enter(), and ~TraceRegionRecord().