mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Use flat_hash_map for source location payload map.
This commit is contained in:
parent
7a13892754
commit
f2a19c4593
@ -5,6 +5,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "TracyVector.hpp"
|
#include "TracyVector.hpp"
|
||||||
|
#include "tracy_flat_hash_map.hpp"
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
@ -210,6 +211,7 @@ struct SourceLocationHasher
|
|||||||
{
|
{
|
||||||
return charutil::hash( (const char*)ptr, sizeof( SourceLocation ) );
|
return charutil::hash( (const char*)ptr, sizeof( SourceLocation ) );
|
||||||
}
|
}
|
||||||
|
typedef tracy::power_of_two_hash_policy hash_policy;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SourceLocationComparator
|
struct SourceLocationComparator
|
||||||
|
|||||||
@ -189,7 +189,7 @@ private:
|
|||||||
std::unordered_map<const char*, uint32_t, charutil::Hasher, charutil::Comparator> m_stringMap;
|
std::unordered_map<const char*, uint32_t, charutil::Hasher, charutil::Comparator> m_stringMap;
|
||||||
|
|
||||||
Vector<SourceLocation*> m_sourceLocationPayload;
|
Vector<SourceLocation*> m_sourceLocationPayload;
|
||||||
std::unordered_map<SourceLocation*, uint32_t, SourceLocationHasher, SourceLocationComparator> m_sourceLocationPayloadMap;
|
flat_hash_map<SourceLocation*, uint32_t, SourceLocationHasher, SourceLocationComparator> m_sourceLocationPayloadMap;
|
||||||
|
|
||||||
NonRecursiveBenaphore m_mbpslock;
|
NonRecursiveBenaphore m_mbpslock;
|
||||||
std::vector<float> m_mbps;
|
std::vector<float> m_mbps;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user