Go to the documentation of this file.
34 #ifndef __H__UG__COMMON__PROFILER_C__
35 #define __H__UG__COMMON__PROFILER_C__
37 #ifdef __H__UG__COMMON__PROFILER__
38 #error "can't use profiler_c.h and profiler.h"
44 #ifdef UG_PROFILER_SHINY
47 #define SHINY_PROFILER TRUE
48 #include "src/ShinyManager.h"
49 #include "src/ShinyNode.h"
52 #define C_PROFILE_BEGIN_PARAMS(id, name, group, file, line) \
54 static Shiny::ProfileZone __ShinyZone_##id = { \
55 NULL, Shiny::ProfileZone::STATE_HIDDEN, name, \
57 { { 0, 0 }, { 0, 0 }, { 0, 0 } } \
60 static Shiny::ProfileNodeCache cache = \
61 &Shiny::ProfileNode::_dummy; \
63 Shiny::ProfileManager::instance._beginNode(&cache, &__ShinyZone_##id);\
67 #define C_PROFILE_BEGIN_GROUP(name, group) \
68 C_PROFILE_BEGIN_PARAMS(apn_##name, #name, group, __FILE__, __LINE__)
70 #define C_PROFILE_BEGIN(name) \
71 C_PROFILE_BEGIN_GROUP(name, NULL)
73 #define C_PROFILE_END() \
74 Shiny::ProfileManager::instance._endCurNode()
76 #define C_PROFILE_FUNC_BEGIN() \
77 C_PROFILE_BEGIN(__FUNCTION__)
78 #define PROFILE_FUNC_GROUP_BEGIN(groups) \
79 C_PROFILE_BEGIN_GROUP(__FUNCTION__, groups)
82 #error "not defined for C"
86 #define C_PROFILE_BEGIN(name)
87 #define C_PROFILE_BEGIN_GROUP(name, groups)
88 #define C_PROFILE_END()
89 #define C_PROFILE_FUNC_BEGIN()
90 #define C_PROFILE_FUNC_GROUP_BEGIN(groups)