mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-28 17:28:14 +08:00
Linux build
This commit is contained in:
parent
330951cb62
commit
795d347d2a
@ -203,6 +203,18 @@ namespace profiler {
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hashed_stdstring(const char* _str, size_t _hash_code) : m_str(_str), m_hash(_hash_code)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
hashed_stdstring(const ::std::string& _str, size_t _hash_code) : m_str(_str), m_hash(_hash_code)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
hashed_stdstring(::std::string&& _str, size_t _hash_code) : m_str(::std::forward<::std::string&&>(_str)), m_hash(_hash_code)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
hashed_stdstring(const hashed_stdstring&) = default;
|
hashed_stdstring(const hashed_stdstring&) = default;
|
||||||
hashed_stdstring& operator = (const hashed_stdstring&) = default;
|
hashed_stdstring& operator = (const hashed_stdstring&) = default;
|
||||||
|
|
||||||
|
@ -490,8 +490,12 @@ void ProfileManager::setBlockEnabled(profiler::block_id_t _id, const profiler::h
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
blocks_enable_status_t::key_type key(_key.c_str(), _key.size(), _key.hcode());
|
blocks_enable_status_t::key_type key(_key.c_str(), _key.size(), _key.hcode());
|
||||||
m_blocksEnableStatus[key] = _enabled;
|
m_blocksEnableStatus[key] = _enabled;
|
||||||
|
#else
|
||||||
|
m_blocksEnableStatus[_key] = _enabled;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,7 +312,12 @@ class ProfileManager final
|
|||||||
typedef profiler::guard_lock<profiler::spin_lock> guard_lock_t;
|
typedef profiler::guard_lock<profiler::spin_lock> guard_lock_t;
|
||||||
typedef std::map<profiler::thread_id_t, ThreadStorage> map_of_threads_stacks;
|
typedef std::map<profiler::thread_id_t, ThreadStorage> map_of_threads_stacks;
|
||||||
typedef std::vector<profiler::BlockDescriptor*> block_descriptors_t;
|
typedef std::vector<profiler::BlockDescriptor*> block_descriptors_t;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
typedef std::unordered_map<profiler::hashed_cstr, bool> blocks_enable_status_t;
|
typedef std::unordered_map<profiler::hashed_cstr, bool> blocks_enable_status_t;
|
||||||
|
#else
|
||||||
|
typedef std::unordered_map<profiler::hashed_stdstring, bool> blocks_enable_status_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
map_of_threads_stacks m_threads;
|
map_of_threads_stacks m_threads;
|
||||||
block_descriptors_t m_descriptors;
|
block_descriptors_t m_descriptors;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user