diff --git a/include/profiler/profiler.h b/include/profiler/profiler.h
index 7c8bead..e0d2b8b 100644
--- a/include/profiler/profiler.h
+++ b/include/profiler/profiler.h
@@ -26,6 +26,7 @@ along with this program.If not, see .
#define __func__ __FUNCTION__
#endif
+#ifndef FULL_DISABLE_PROFILER
#define PROFILER_ADD_MARK(name) profiler::Mark TOKEN_CONCATENATE(unique_profiler_mark_name_,__LINE__)(name);\
profiler::registerMark(&TOKEN_CONCATENATE(unique_profiler_mark_name_,__LINE__));
@@ -48,6 +49,18 @@ along with this program.If not, see .
#define PROFILER_DISABLE profiler::setEnabled(false);
+#else
+#define PROFILER_ADD_MARK(name)
+#define PROFILER_ADD_MARK_GROUPED(name,block_group)
+#define PROFILER_BEGIN_BLOCK(name)
+#define PROFILER_BEGIN_BLOCK_GROUPED(name,block_group)
+#define PROFILER_BEGIN_FUNCTION_BLOCK PROFILER_BEGIN_BLOCK(__func__)
+#define PROFILER_BEGIN_FUNCTION_BLOCK_GROUPED(block_group) PROFILER_BEGIN_BLOCK_GROUPED(__func__,block_group)
+#define PROFILER_END_BLOCK profiler::endBlock();
+#define PROFILER_ENABLE profiler::setEnabled(true);
+#define PROFILER_DISABLE profiler::setEnabled(false);
+#endif
+
#include
#include
diff --git a/src/profile_manager.cpp b/src/profile_manager.cpp
index 2dc6412..53d4d19 100644
--- a/src/profile_manager.cpp
+++ b/src/profile_manager.cpp
@@ -1,5 +1,4 @@
#include "profile_manager.h"
-#include "profiler/profiler.h"
#include
@@ -74,7 +73,6 @@ void ProfileManager::endBlock()
if (lastBlock && !lastBlock->isFinished()){
lastBlock->finish();
}
-
stackOfOpenedBlocks.pop();
}