From 5dfb4561766edca5ed7382757cda0e630d4bd6a2 Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Wed, 24 Feb 2016 00:08:13 +0300 Subject: [PATCH] Linux runtime fix --- src/profile_manager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/profile_manager.cpp b/src/profile_manager.cpp index 488ee38..7df46b2 100644 --- a/src/profile_manager.cpp +++ b/src/profile_manager.cpp @@ -2,6 +2,8 @@ #include #include +#include + using namespace profiler; extern "C"{ @@ -80,10 +82,11 @@ void ProfileManager::beginBlock(Block* _block) void ProfileManager::endBlock() { + if (!m_isEnabled) return; - size_t threadId = std::hash()(std::this_thread::get_id()); + uint32_t threadId = std::hash()(std::this_thread::get_id()); guard_lock_t lock(m_spin); auto& stackOfOpenedBlocks = m_openedBracketsMap[threadId];