LAMA
/home/brandes/workspace/LAMA/src/lama/tracing/TraceRegionRecord.hpp
Go to the documentation of this file.
00001 
00034 #ifndef LAMA_TRACING_TRACE_REGION_RECORD_HPP_
00035 #define LAMA_TRACING_TRACE_REGION_RECORD_HPP_
00036 
00037 // for dll_import
00038 #include <lama/config.hpp>
00039 
00040 // base classes
00041 #include <lama/tracing/LAMABaseTracer.hpp>
00042 
00043 // logging
00044 #include <logging/logging.hpp>
00045 
00046 // boost
00047 #include <boost/shared_ptr.hpp>
00048 
00056 namespace tracing
00057 {
00058 
00059 class TraceRegionRecord : public LAMABaseTracer
00060 {
00061 
00062 public:
00063 
00071     TraceRegionRecord( const char* regionName, const char* fileName, int lno );
00072 
00076     TraceRegionRecord( const char* regionName, int n, const char* fileName, int lno );
00077 
00080     ~TraceRegionRecord();
00081 
00091     static double spentLast( const char* regionName ) ;
00092 
00095     static void start( const char* regionName, const char* file, int lno );
00096 
00099     static void stop( const char* regionName );
00100 
00101 private:
00102 
00103     LAMA_LOG_DECL_STATIC_LOGGER( logger );
00104 
00107     void enter( const char* regionName, const char* file, int lno );
00108 
00114     boost::shared_ptr<class TraceConfig> mTraceConfig;
00115 
00116     class RegionTable* mRegionTable;  // pointer to thread region time table
00117 
00118     int mRegionId;  // Reference id of region in region table.
00119 
00120     bool mTimeTrace;    
00121     bool mVampirTrace;  
00122 
00123     double mStartTime;  
00124 };
00125 
00126 } // namespace
00127 
00128 #endif // LAMA_TRACING_TRACE_REGION_RECORD_HPP_