mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 00:31:02 +08:00
Linux runtime fix
This commit is contained in:
parent
98f3da5122
commit
5dfb456176
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
using namespace profiler;
|
using namespace profiler;
|
||||||
|
|
||||||
extern "C"{
|
extern "C"{
|
||||||
@ -80,10 +82,11 @@ void ProfileManager::beginBlock(Block* _block)
|
|||||||
|
|
||||||
void ProfileManager::endBlock()
|
void ProfileManager::endBlock()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!m_isEnabled)
|
if (!m_isEnabled)
|
||||||
return;
|
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);
|
guard_lock_t lock(m_spin);
|
||||||
auto& stackOfOpenedBlocks = m_openedBracketsMap[threadId];
|
auto& stackOfOpenedBlocks = m_openedBracketsMap[threadId];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user