40 #define TAU_DEFAULT 0xffffffff
41 #define TAU_MESSAGE 0x00000001
42 #define TAU_PETE 0x00000002
43 #define TAU_VIZ 0x00000004
44 #define TAU_ASSIGN 0x00000008
45 #define TAU_IO 0x00000010
46 #define TAU_FIELD 0x00000020
47 #define TAU_LAYOUT 0x00000040
48 #define TAU_SPARSE 0x00000080
49 #define TAU_DOMAINMAP 0x00000100
50 #define TAU_UTILITY 0x00000200
51 #define TAU_REGION 0x00000400
52 #define TAU_PARTICLE 0x00000800
53 #define TAU_MESHES 0x00001000
54 #define TAU_SUBFIELD 0x00002000
55 #define TAU_COMMUNICATION 0x00004000
56 #define TAU_DESCRIPTOR_OVERHEAD 0x00008000
63 #define TAU_FFT 0x00100000
64 #define TAU_ACLMPL 0x00200000
65 #define TAU_PAWS1 0x00400000
66 #define TAU_PAWS2 0x00800000
67 #define TAU_PAWS3 0x01000000
71 #define TAU_USER4 0x08000000
72 #define TAU_USER3 0x10000000
73 #define TAU_USER2 0x20000000
74 #define TAU_USER1 0x40000000
75 #define TAU_USER 0x80000000
77 #define TAU_MAX_THREADS 1024
104 const char *ProfileGroupName =
"TAU_DEFAULT");
107 const char *ProfileGroupName =
"TAU_DEFAULT");
110 const char *ProfileGroupName =
"TAU_DEFAULT");
113 const char *ProfileGroupName =
"TAU_DEFAULT");
138 list < std::pair<double,double> > *ExclInclCallList;
142 int AppendExclInclTimeThisCall(
double ex,
double in);
144 #endif // PROFILE_CALLS
157 #endif // PROFILE_STATS
175 double GetSumExclSqr()
const {
return SumExclSqr; }
176 void AddSumExclSqr(
double ExclSqr) { SumExclSqr += ExclSqr; }
177 #endif // PROFILE_STATS
245 bool StartStop =
false);
256 #if ( defined(PROFILE_CALLS) || defined(PROFILE_STATS) )
257 int ExcludeTimeThisCall(
double t);
258 double ExclTimeThisCall;
259 #endif // PROFILE_CALLS || PROFILE_STATS
301 static bool isEnabled(
unsigned int ProfileGroup) ;
305 static std::string
PrimaryGroup(
const char *ProfileGroupName);
314 if (str == 0)
return " ";
347 #define TAU_TYPE_STRING(profileString, str) static string profileString(str);
348 #define TAU_PROFILE(name, type, group) \
349 static FunctionInfo tauFI(name, type, group, #group); \
350 Profiler tauFP(&tauFI, group);
351 #define TAU_PROFILE_TIMER(var, name, type, group) \
352 static FunctionInfo var##fi(name, type, group, #group); \
353 Profiler var(&var##fi, group, true);
357 #define TAU_PROFILE_START(var) var.Start();
358 #define TAU_PROFILE_STOP(var) var.Stop();
359 #define TAU_PROFILE_STMT(stmt) stmt;
360 #define TAU_PROFILE_EXIT(msg) Profiler::ProfileExit(msg);
361 #define TAU_PROFILE_INIT(argc, argv) RtsLayer::ProfileInit(argc, argv);
362 #define TAU_PROFILE_SET_NODE(node) RtsLayer::setMyNode(node);
365 #define CT(obj) std::string(#obj)
366 #else // RTTI is present
367 #define CT(obj) std::string(RtsLayer::CheckNotNull(typeid(obj).name()))
378 #define TYPE_STRING(profileString, str)
379 #define PROFILED_BLOCK(name, type)
381 #define TAU_TYPE_STRING(profileString, str)
382 #define TAU_PROFILE(name, type, group)
383 #define TAU_PROFILE_TIMER(var, name, type, group)
384 #define TAU_PROFILE_START(var)
385 #define TAU_PROFILE_STOP(var)
386 #define TAU_PROFILE_STMT(stmt)
387 #define TAU_PROFILE_EXIT(msg)
388 #define TAU_PROFILE_INIT(argc, argv)
389 #define TAU_PROFILE_SET_NODE(node)
395 #define TAU_TRACE_SENDMSG(type, destination, length) RtsLayer::TraceSendMsg(type, destination, length);
396 #define TAU_TRACE_RECVMSG(type, source, length) RtsLayer::TraceRecvMsg(type, source, length);
399 #define TAU_TRACE_SENDMSG(type, destination, length)
400 #define TAU_TRACE_RECVMSG(type, source, length)
static Profiler * CurrentProfiler[1024]
static unsigned int enableProfileGroup(unsigned int ProfileGroup)
const char * GetName() const
unsigned int MyProfileGroup_
static unsigned int resetProfileGroup(void)
double GetExclTime() const
FunctionInfo * ThisFunction
static const char * CheckNotNull(const char *str)
static int setAndParseProfileGroups(char *prog, char *str)
const char * GetPrimaryGroup() const
Profiler & operator=(const Profiler &X)
void AddExclTime(double t)
static void ProfileExit(const char *message=0)
void AddInclTime(double t)
static std::string PrimaryGroup(const char *ProfileGroupName)
void SetAlreadyOnStack(bool value)
unsigned int MyProfileGroup_
static bool isCtorDtor(const char *name)
static std::vector< FunctionInfo * > FunctionDB[1024]
long GetFunctionId() const
static int setMyNode(int NodeId)
static void TraceSendMsg(int type, int destination, int length)
static void TraceRecvMsg(int type, int source, int length)
static double GetEventCounter(void)
FunctionInfo & operator=(const FunctionInfo &X)
Profiler * ParentProfiler
static bool isEnabled(unsigned int ProfileGroup)
bool GetAlreadyOnStack(void)
void ExcludeTime(double t)
const char * GetType() const
static unsigned int ProfileMask
unsigned int GetProfileGroup() const
static int SetEventCounter(void)
Profiler(FunctionInfo *fi, unsigned int ProfileGroup=0xffffffff, bool StartStop=false)
FunctionInfo(const char *name, const char *type, unsigned int ProfileGroup=0xffffffff, const char *ProfileGroupName="TAU_DEFAULT")
double GetInclTime() const
static double getUSecD(void)
static void ProfileInit(int argc, char **argv)