0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-26 08:01:51 +08:00

Linux runtime fix

This commit is contained in:
Sergey Yagovtsev 2016-02-24 00:08:13 +03:00
parent 98f3da5122
commit 5dfb456176

View File

@ -2,6 +2,8 @@
#include <thread>
#include <string.h>
#include <fstream>
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::thread::id>()(std::this_thread::get_id());
uint32_t threadId = std::hash<std::thread::id>()(std::this_thread::get_id());
guard_lock_t lock(m_spin);
auto& stackOfOpenedBlocks = m_openedBracketsMap[threadId];