diff --git a/capture/build/win32/capture.vcxproj b/capture/build/win32/capture.vcxproj
index 4d37aed9..ed98bece 100644
--- a/capture/build/win32/capture.vcxproj
+++ b/capture/build/win32/capture.vcxproj
@@ -165,7 +165,6 @@
-
diff --git a/capture/build/win32/capture.vcxproj.filters b/capture/build/win32/capture.vcxproj.filters
index c815bac1..191db13c 100644
--- a/capture/build/win32/capture.vcxproj.filters
+++ b/capture/build/win32/capture.vcxproj.filters
@@ -71,9 +71,6 @@
common
-
- server
-
server
diff --git a/import-chrome/build/win32/import-chrome.vcxproj b/import-chrome/build/win32/import-chrome.vcxproj
index afac50cb..3531e8f9 100644
--- a/import-chrome/build/win32/import-chrome.vcxproj
+++ b/import-chrome/build/win32/import-chrome.vcxproj
@@ -162,9 +162,8 @@
-
-
+
\ No newline at end of file
diff --git a/import-chrome/build/win32/import-chrome.vcxproj.filters b/import-chrome/build/win32/import-chrome.vcxproj.filters
index 13967783..ab4b7048 100644
--- a/import-chrome/build/win32/import-chrome.vcxproj.filters
+++ b/import-chrome/build/win32/import-chrome.vcxproj.filters
@@ -65,9 +65,6 @@
common
-
- server
-
server
@@ -111,4 +108,4 @@
server
-
+
\ No newline at end of file
diff --git a/profiler/build/win32/Tracy.vcxproj b/profiler/build/win32/Tracy.vcxproj
index e30e581b..6ccb7d7a 100644
--- a/profiler/build/win32/Tracy.vcxproj
+++ b/profiler/build/win32/Tracy.vcxproj
@@ -186,8 +186,8 @@
-
+
diff --git a/profiler/build/win32/Tracy.vcxproj.filters b/profiler/build/win32/Tracy.vcxproj.filters
index 74b22675..1be42d31 100644
--- a/profiler/build/win32/Tracy.vcxproj.filters
+++ b/profiler/build/win32/Tracy.vcxproj.filters
@@ -173,9 +173,6 @@
server
-
- server
-
common
@@ -308,6 +305,9 @@
server
+
+ server
+
diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp
index bd3b6da8..d7e31574 100644
--- a/profiler/src/main.cpp
+++ b/profiler/src/main.cpp
@@ -28,8 +28,8 @@
#include "stb_image.h"
#include "../../common/TracyProtocol.hpp"
-#include "../../server/tracy_flat_hash_map.hpp"
#include "../../server/tracy_pdqsort.h"
+#include "../../server/tracy_robin_hood.h"
#include "../../server/TracyBadVersion.hpp"
#include "../../server/TracyFileRead.hpp"
#include "../../server/TracyImGui.hpp"
@@ -105,7 +105,7 @@ struct ClientData
enum class ViewShutdown { False, True, Join };
-static tracy::flat_hash_map clients;
+static tracy::unordered_flat_map clients;
static std::unique_ptr view;
static tracy::BadVersionState badVer;
static int port = 8086;
@@ -114,7 +114,7 @@ static char title[128];
static std::thread loadThread;
static std::unique_ptr broadcastListen;
static std::mutex resolvLock;
-static tracy::flat_hash_map resolvMap;
+static tracy::unordered_flat_map resolvMap;
static ResolvService resolv( port );
static ImFont* bigFont;
static ImFont* smallFont;
diff --git a/server/TracyCharUtil.hpp b/server/TracyCharUtil.hpp
index 8a789c5e..f8ef14f2 100644
--- a/server/TracyCharUtil.hpp
+++ b/server/TracyCharUtil.hpp
@@ -7,7 +7,6 @@
#define XXH_STATIC_LINKING_ONLY
#include "tracy_xxh3.h"
-#include "tracy_flat_hash_map.hpp"
namespace tracy
{
@@ -33,11 +32,6 @@ struct Hasher
}
};
-struct HasherPOT : public Hasher
-{
- typedef tracy::power_of_two_hash_policy hash_policy;
-};
-
struct Comparator
{
bool operator()( const char* lhs, const char* rhs ) const
@@ -67,11 +61,6 @@ struct StringKey
}
};
- struct HasherPOT : public Hasher
- {
- typedef tracy::power_of_two_hash_policy hash_policy;
- };
-
struct Comparator
{
bool operator()( const StringKey& lhs, const StringKey& rhs ) const
diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp
index 140acbd2..0f781277 100644
--- a/server/TracyEvent.hpp
+++ b/server/TracyEvent.hpp
@@ -10,7 +10,7 @@
#include "TracyCharUtil.hpp"
#include "TracyShortPtr.hpp"
#include "TracyVector.hpp"
-#include "tracy_flat_hash_map.hpp"
+#include "tracy_robin_hood.h"
#include "../common/TracyForceInline.hpp"
namespace tracy
@@ -323,11 +323,13 @@ enum { CallstackFrameIdSize = sizeof( CallstackFrameId ) };
struct CallstackFrameTree
{
+ CallstackFrameTree( CallstackFrameId id ) : frame( id ) {}
+
CallstackFrameId frame;
uint64_t alloc;
uint32_t count;
- flat_hash_map> children;
- flat_hash_set> callstacks;
+ unordered_flat_map children;
+ unordered_flat_set callstacks;
};
enum { CallstackFrameTreeSize = sizeof( CallstackFrameTree ) };
@@ -464,7 +466,7 @@ struct GpuCtxData
uint64_t count;
uint8_t accuracyBits;
float period;
- flat_hash_map> threadData;
+ unordered_flat_map threadData;
short_ptr query[64*1024];
};
@@ -480,7 +482,7 @@ struct LockMap
int16_t srcloc;
Vector timeline;
- flat_hash_map> threadMap;
+ unordered_flat_map threadMap;
std::vector threadList;
LockType type;
int64_t timeAnnounce;
@@ -530,7 +532,7 @@ struct MemData
{
Vector data;
Vector frees;
- flat_hash_map> active;
+ unordered_flat_map active;
uint64_t high = std::numeric_limits::min();
uint64_t low = std::numeric_limits::max();
uint64_t usage = 0;
@@ -561,7 +563,6 @@ struct SourceLocationHasher
{
return charutil::hash( (const char*)ptr, sizeof( SourceLocationBase ) );
}
- typedef tracy::power_of_two_hash_policy hash_policy;
};
struct SourceLocationComparator
diff --git a/server/TracyStringDiscovery.hpp b/server/TracyStringDiscovery.hpp
index bd217be4..0428fed0 100644
--- a/server/TracyStringDiscovery.hpp
+++ b/server/TracyStringDiscovery.hpp
@@ -2,7 +2,7 @@
#define __TRACYSTRINGDISCOVERY_HPP__
#include "../common/TracyForceInline.hpp"
-#include "tracy_flat_hash_map.hpp"
+#include "tracy_robin_hood.h"
#include "TracyCharUtil.hpp"
#include "TracyVector.hpp"
@@ -69,9 +69,9 @@ public:
private:
Vector m_data;
- flat_hash_map> m_pending;
- flat_hash_map> m_map;
- flat_hash_map m_rev;
+ unordered_flat_map m_pending;
+ unordered_flat_map m_map;
+ unordered_flat_map m_rev;
};
}
diff --git a/server/TracyThreadCompress.hpp b/server/TracyThreadCompress.hpp
index af348b51..69886738 100644
--- a/server/TracyThreadCompress.hpp
+++ b/server/TracyThreadCompress.hpp
@@ -5,7 +5,7 @@
#include
#include "../common/TracyForceInline.hpp"
-#include "tracy_flat_hash_map.hpp"
+#include "tracy_robin_hood.h"
#include "TracyVector.hpp"
namespace tracy
@@ -51,7 +51,7 @@ private:
uint16_t CompressThreadReal( uint64_t thread );
uint16_t CompressThreadNew( uint64_t thread );
- flat_hash_map> m_threadMap;
+ unordered_flat_map m_threadMap;
Vector m_threadExpand;
std::pair m_threadLast;
};
diff --git a/server/TracyVarArray.hpp b/server/TracyVarArray.hpp
index 789d498f..7ab7c01e 100644
--- a/server/TracyVarArray.hpp
+++ b/server/TracyVarArray.hpp
@@ -5,7 +5,6 @@
#include
#include "../common/TracyForceInline.hpp"
-#include "tracy_flat_hash_map.hpp"
#include "TracyCharUtil.hpp"
#include "TracyEvent.hpp"
#include "TracyMemory.hpp"
@@ -97,12 +96,6 @@ struct VarArrayHasher
}
};
-template
-struct VarArrayHasherPOT : public VarArrayHasher
-{
- typedef tracy::power_of_two_hash_policy hash_policy;
-};
-
template
struct VarArrayComparator
{
diff --git a/server/TracyView.cpp b/server/TracyView.cpp
index d992af8e..b20d704a 100644
--- a/server/TracyView.cpp
+++ b/server/TracyView.cpp
@@ -5607,7 +5607,7 @@ void DrawZoneTrace( T zone, const std::vector& trace, const Worker& worker, B
ImGui::TreePop();
}
-void View::CalcZoneTimeData( flat_hash_map>& data, flat_hash_map>::iterator zit, const ZoneEvent& zone )
+void View::CalcZoneTimeData( unordered_flat_map& data, unordered_flat_map::iterator zit, const ZoneEvent& zone )
{
assert( zone.HasChildren() );
const auto& children = m_worker.GetZoneChildren( zone.Child() );
@@ -5622,7 +5622,7 @@ void View::CalcZoneTimeData( flat_hash_map
-void View::CalcZoneTimeDataImpl( const V& children, flat_hash_map>& data, flat_hash_map>::iterator zit, const ZoneEvent& zone )
+void View::CalcZoneTimeDataImpl( const V& children, unordered_flat_map& data, unordered_flat_map::iterator zit, const ZoneEvent& zone )
{
Adapter a;
if( m_timeDist.exclusiveTime )
@@ -5651,7 +5651,7 @@ void View::CalcZoneTimeDataImpl( const V& children, flat_hash_map>& data, flat_hash_map>::iterator zit, const ZoneEvent& zone )
+void View::CalcZoneTimeData( const ContextSwitch* ctx, unordered_flat_map& data, unordered_flat_map::iterator zit, const ZoneEvent& zone )
{
assert( zone.HasChildren() );
const auto& children = m_worker.GetZoneChildren( zone.Child() );
@@ -5666,7 +5666,7 @@ void View::CalcZoneTimeData( const ContextSwitch* ctx, flat_hash_map
-void View::CalcZoneTimeDataImpl( const V& children, const ContextSwitch* ctx, flat_hash_map>& data, flat_hash_map>::iterator zit, const ZoneEvent& zone )
+void View::CalcZoneTimeDataImpl( const V& children, const ContextSwitch* ctx, unordered_flat_map& data, unordered_flat_map::iterator zit, const ZoneEvent& zone )
{
Adapter a;
if( m_timeDist.exclusiveTime )
@@ -6388,7 +6388,7 @@ void View::DrawZoneInfoWindow()
}
if( !m_timeDist.data.empty() )
{
- std::vector>::const_iterator> vec;
+ std::vector::const_iterator> vec;
vec.reserve( m_timeDist.data.size() );
for( auto it = m_timeDist.data.cbegin(); it != m_timeDist.data.cend(); ++it ) vec.emplace_back( it );
static bool widthSet = false;
@@ -6478,7 +6478,7 @@ void View::DrawZoneInfoChildren( const V& children, int64_t ztime )
Vector v;
};
uint64_t ctime = 0;
- flat_hash_map> cmap;
+ unordered_flat_map cmap;
cmap.reserve( 128 );
for( size_t i=0; i v;
};
uint64_t ctime = 0;
- flat_hash_map> cmap;
+ unordered_flat_map cmap;
cmap.reserve( 128 );
for( size_t i=0; i> pids;
+ unordered_flat_map pids;
for( auto& v : ctd )
{
uint64_t pid = m_worker.GetPidFromTid( v.first );
@@ -12270,7 +12270,7 @@ void View::DrawCpuDataWindow()
ImGui::NextColumn();
ImGui::Separator();
- std::vector>::iterator> psort;
+ std::vector::iterator> psort;
psort.reserve( pids.size() );
for( auto it = pids.begin(); it != pids.end(); ++it ) psort.emplace_back( it );
switch( m_cpuDataSort )
@@ -12763,17 +12763,17 @@ void View::ListMemData( T ptr, T end, std::function DrawAddress, const
ImGui::EndChild();
}
-static tracy_force_inline CallstackFrameTree* GetFrameTreeItemNoGroup( flat_hash_map>& tree, CallstackFrameId idx, const Worker& worker )
+static tracy_force_inline CallstackFrameTree* GetFrameTreeItemNoGroup( unordered_flat_map& tree, CallstackFrameId idx, const Worker& worker )
{
auto it = tree.find( idx.data );
if( it == tree.end() )
{
- it = tree.emplace( idx.data, CallstackFrameTree { idx } ).first;
+ it = tree.emplace( idx.data, CallstackFrameTree( idx ) ).first;
}
return &it->second;
}
-static tracy_force_inline CallstackFrameTree* GetFrameTreeItemGroup( flat_hash_map>& tree, CallstackFrameId idx, const Worker& worker )
+static tracy_force_inline CallstackFrameTree* GetFrameTreeItemGroup( unordered_flat_map& tree, CallstackFrameId idx, const Worker& worker )
{
auto frameDataPtr = worker.GetCallstackFrame( idx );
if( !frameDataPtr ) return nullptr;
@@ -12785,14 +12785,14 @@ static tracy_force_inline CallstackFrameTree* GetFrameTreeItemGroup( flat_hash_m
auto it = tree.find( fidx );
if( it == tree.end() )
{
- it = tree.emplace( fidx, CallstackFrameTree { idx } ).first;
+ it = tree.emplace( fidx, CallstackFrameTree( idx ) ).first;
}
return &it->second;
}
-flat_hash_map> View::GetCallstackPaths( const MemData& mem, bool onlyActive ) const
+unordered_flat_map View::GetCallstackPaths( const MemData& mem, bool onlyActive ) const
{
- flat_hash_map> pathSum;
+ unordered_flat_map pathSum;
pathSum.reserve( m_worker.GetCallstackPayloadCount() );
const auto zvMid = m_vd.zvStart + ( m_vd.zvEnd - m_vd.zvStart ) / 2;
@@ -12839,9 +12839,9 @@ flat_hash_map> View::GetCallstackPath
return pathSum;
}
-flat_hash_map> View::GetCallstackFrameTreeBottomUp( const MemData& mem ) const
+unordered_flat_map View::GetCallstackFrameTreeBottomUp( const MemData& mem ) const
{
- flat_hash_map> root;
+ unordered_flat_map root;
auto pathSum = GetCallstackPaths( mem, m_activeOnlyBottomUp );
if( m_groupCallstackTreeByNameBottomUp )
{
@@ -12892,9 +12892,9 @@ flat_hash_map> View::GetCallstack
return root;
}
-flat_hash_map> View::GetCallstackFrameTreeTopDown( const MemData& mem ) const
+unordered_flat_map View::GetCallstackFrameTreeTopDown( const MemData& mem ) const
{
- flat_hash_map> root;
+ unordered_flat_map root;
auto pathSum = GetCallstackPaths( mem, m_activeOnlyTopDown );
if( m_groupCallstackTreeByNameTopDown )
{
@@ -12993,7 +12993,7 @@ struct MemoryPage
int8_t data[PageSize];
};
-static tracy_force_inline MemoryPage& GetPage( flat_hash_map>& memmap, uint64_t page )
+static tracy_force_inline MemoryPage& GetPage( unordered_flat_map& memmap, uint64_t page )
{
auto it = memmap.find( page );
if( it == memmap.end() )
@@ -13003,7 +13003,7 @@ static tracy_force_inline MemoryPage& GetPage( flat_hash_mapsecond;
}
-static tracy_force_inline void FillPages( flat_hash_map>& memmap, uint64_t c0, uint64_t c1, int8_t val )
+static tracy_force_inline void FillPages( unordered_flat_map& memmap, uint64_t c0, uint64_t c1, int8_t val )
{
auto p0 = c0 >> PageBits;
const auto p1 = c1 >> PageBits;
@@ -13047,7 +13047,7 @@ std::vector View::GetMemoryPages() const
{
std::vector ret;
- static flat_hash_map> memmap;
+ static unordered_flat_map memmap;
const auto& mem = m_worker.GetMemData();
const auto memlow = mem.low;
@@ -13092,7 +13092,7 @@ std::vector View::GetMemoryPages() const
}
}
- std::vector>::const_iterator> itmap;
+ std::vector::const_iterator> itmap;
itmap.reserve( memmap.size() );
ret.reserve( memmap.size() );
for( auto it = memmap.begin(); it != memmap.end(); ++it ) itmap.emplace_back( it );
@@ -13407,11 +13407,11 @@ void View::DrawMemory()
ImGui::End();
}
-void View::DrawFrameTreeLevel( const flat_hash_map>& tree, int& idx )
+void View::DrawFrameTreeLevel( const unordered_flat_map& tree, int& idx )
{
auto& io = ImGui::GetIO();
- std::vector>::const_iterator> sorted;
+ std::vector::const_iterator> sorted;
sorted.reserve( tree.size() );
for( auto it = tree.begin(); it != tree.end(); ++it )
{
diff --git a/server/TracyView.hpp b/server/TracyView.hpp
index b6a0f0ea..900be531 100644
--- a/server/TracyView.hpp
+++ b/server/TracyView.hpp
@@ -17,7 +17,7 @@
#include "TracyVector.hpp"
#include "TracyViewData.hpp"
#include "TracyWorker.hpp"
-#include "tracy_flat_hash_map.hpp"
+#include "tracy_robin_hood.h"
struct ImVec2;
struct ImFont;
@@ -156,10 +156,10 @@ private:
template
void ListMemData( T ptr, T end, std::function DrawAddress, const char* id = nullptr, int64_t startTime = -1 );
- flat_hash_map> GetCallstackPaths( const MemData& mem, bool onlyActive ) const;
- flat_hash_map> GetCallstackFrameTreeBottomUp( const MemData& mem ) const;
- flat_hash_map> GetCallstackFrameTreeTopDown( const MemData& mem ) const;
- void DrawFrameTreeLevel( const flat_hash_map>& tree, int& idx );
+ unordered_flat_map GetCallstackPaths( const MemData& mem, bool onlyActive ) const;
+ unordered_flat_map GetCallstackFrameTreeBottomUp( const MemData& mem ) const;
+ unordered_flat_map GetCallstackFrameTreeTopDown( const MemData& mem ) const;
+ void DrawFrameTreeLevel( const unordered_flat_map& tree, int& idx );
void DrawZoneList( const Vector>& zones );
void DrawInfoWindow();
@@ -231,19 +231,19 @@ private:
int64_t GetZoneSelfTime( const GpuEvent& zone );
bool GetZoneRunningTime( const ContextSwitch* ctx, const ZoneEvent& ev, int64_t& time, uint64_t& cnt );
- tracy_force_inline void CalcZoneTimeData( flat_hash_map>& data, flat_hash_map>::iterator zit, const ZoneEvent& zone );
- tracy_force_inline void CalcZoneTimeData( const ContextSwitch* ctx, flat_hash_map>& data, flat_hash_map>::iterator zit, const ZoneEvent& zone );
+ tracy_force_inline void CalcZoneTimeData( unordered_flat_map& data, unordered_flat_map::iterator zit, const ZoneEvent& zone );
+ tracy_force_inline void CalcZoneTimeData( const ContextSwitch* ctx, unordered_flat_map& data, unordered_flat_map::iterator zit, const ZoneEvent& zone );
template
- void CalcZoneTimeDataImpl( const V& children, flat_hash_map>& data, flat_hash_map>::iterator zit, const ZoneEvent& zone );
+ void CalcZoneTimeDataImpl( const V& children, unordered_flat_map& data, unordered_flat_map::iterator zit, const ZoneEvent& zone );
template
- void CalcZoneTimeDataImpl( const V& children, const ContextSwitch* ctx, flat_hash_map>& data, flat_hash_map>::iterator zit, const ZoneEvent& zone );
+ void CalcZoneTimeDataImpl( const V& children, const ContextSwitch* ctx, unordered_flat_map& data, unordered_flat_map::iterator zit, const ZoneEvent& zone );
void SetPlaybackFrame( uint32_t idx );
- flat_hash_map> m_visData;
- flat_hash_map> m_visibleMsgThread;
- flat_hash_map> m_gpuDrift;
- flat_hash_map> m_plotView;
+ unordered_flat_map m_visData;
+ unordered_flat_map m_visibleMsgThread;
+ unordered_flat_map m_gpuDrift;
+ unordered_flat_map m_plotView;
Vector m_threadOrder;
Vector m_threadDnd;
@@ -415,7 +415,7 @@ private:
bool show = false;
bool ignoreCase = false;
std::vector match;
- flat_hash_map> groups;
+ unordered_flat_map groups;
size_t processed;
uint16_t groupId;
int selMatch = 0;
@@ -626,7 +626,7 @@ private:
SortBy sortBy = SortBy::Time;
bool runningTime = false;
bool exclusiveTime = true;
- flat_hash_map> data;
+ unordered_flat_map data;
const ZoneEvent* dataValidFor = nullptr;
float fztime;
} m_timeDist;
diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp
index bd591181..ddf8f0c4 100644
--- a/server/TracyWorker.cpp
+++ b/server/TracyWorker.cpp
@@ -23,8 +23,6 @@
#include "TracyWorker.hpp"
#include "TracyYield.hpp"
-#include "tracy_flat_hash_map.hpp"
-
namespace tracy
{
@@ -465,7 +463,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
uint32_t packageId;
uint64_t psz;
f.Read2( packageId, psz );
- auto& package = *m_data.cpuTopology.emplace( packageId, flat_hash_map> {} ).first;
+ auto& package = *m_data.cpuTopology.emplace( packageId, unordered_flat_map> {} ).first;
package.second.reserve( psz );
for( uint64_t j=0; j> pointerMap;
+ unordered_flat_map pointerMap;
f.Read( sz );
m_data.stringData.reserve_exact( sz, m_slab );
@@ -850,7 +848,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
s_loadProgress.subTotal.store( 0, std::memory_order_relaxed );
s_loadProgress.progress.store( LoadProgress::Messages, std::memory_order_relaxed );
- flat_hash_map> msgMap;
+ unordered_flat_map msgMap;
f.Read( sz );
if( eventMask & EventType::Messages )
{
@@ -4769,7 +4767,7 @@ void Worker::ProcessParamSetup( const QueueParamSetup& ev )
void Worker::ProcessCpuTopology( const QueueCpuTopology& ev )
{
auto package = m_data.cpuTopology.find( ev.package );
- if( package == m_data.cpuTopology.end() ) package = m_data.cpuTopology.emplace( ev.package, flat_hash_map> {} ).first;
+ if( package == m_data.cpuTopology.end() ) package = m_data.cpuTopology.emplace( ev.package, unordered_flat_map> {} ).first;
auto core = package->second.find( ev.core );
if( core == package->second.end() ) core = package->second.emplace( ev.core, std::vector {} ).first;
core->second.emplace_back( ev.thread );
@@ -5699,7 +5697,7 @@ void Worker::Write( FileWrite& f )
}
// Only save context switches relevant to active threads.
- std::vector>::const_iterator> ctxValid;
+ std::vector::const_iterator> ctxValid;
ctxValid.reserve( m_data.ctxSwitch.size() );
for( auto it = m_data.ctxSwitch.begin(); it != m_data.ctxSwitch.end(); ++it )
{
diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp
index 46ad38a7..d8d45b76 100644
--- a/server/TracyWorker.hpp
+++ b/server/TracyWorker.hpp
@@ -16,7 +16,7 @@
#include "../common/TracyQueue.hpp"
#include "../common/TracyProtocol.hpp"
#include "../common/TracySocket.hpp"
-#include "tracy_flat_hash_map.hpp"
+#include "tracy_robin_hood.h"
#include "TracyEvent.hpp"
#include "TracyShortPtr.hpp"
#include "TracySlab.hpp"
@@ -137,7 +137,6 @@ private:
struct CallstackFrameIdHash
{
size_t operator()( const CallstackFrameId& id ) const { return id.data; }
- typedef tracy::power_of_two_hash_policy hash_policy;
};
struct CallstackFrameIdCompare
@@ -159,7 +158,6 @@ private:
}
return hash;
}
- typedef tracy::power_of_two_hash_policy hash_policy;
};
struct RevFrameComp
@@ -192,29 +190,29 @@ private:
int64_t lastTime = 0;
uint64_t frameOffset = 0;
- flat_hash_map> strings;
+ unordered_flat_map strings;
Vector stringData;
- flat_hash_map stringMap;
- flat_hash_map> threadNames;
- flat_hash_map, nohash> externalNames;
+ unordered_flat_map stringMap;
+ unordered_flat_map threadNames;
+ unordered_flat_map> externalNames;
- flat_hash_map> sourceLocation;
+ unordered_flat_map sourceLocation;
Vector> sourceLocationPayload;
- flat_hash_map sourceLocationPayloadMap;
+ unordered_flat_map sourceLocationPayloadMap;
Vector sourceLocationExpand;
#ifndef TRACY_NO_STATISTICS
- flat_hash_map> sourceLocationZones;
+ unordered_flat_map sourceLocationZones;
bool sourceLocationZonesReady;
#else
- flat_hash_map sourceLocationZonesCnt;
+ unordered_flat_map sourceLocationZonesCnt;
#endif
- flat_hash_map*, uint32_t, VarArrayHasherPOT, VarArrayComparator> callstackMap;
+ unordered_flat_map*, uint32_t, VarArrayHasher, VarArrayComparator> callstackMap;
Vector>> callstackPayload;
- flat_hash_map callstackFrameMap;
- flat_hash_map revFrameMap;
+ unordered_flat_map callstackFrameMap;
+ unordered_flat_map revFrameMap;
- flat_hash_map> lockMap;
+ unordered_flat_map lockMap;
ThreadCompress localThreadCompress;
ThreadCompress externalThreadCompress;
@@ -229,12 +227,12 @@ private:
CrashEvent crashEvent;
- flat_hash_map> ctxSwitch;
+ unordered_flat_map ctxSwitch;
CpuData cpuData[256];
int cpuDataCount = 0;
- flat_hash_map> tidToPid;
- flat_hash_map> cpuThreadData;
+ unordered_flat_map tidToPid;
+ unordered_flat_map cpuThreadData;
std::pair threadDataLast = std::make_pair( std::numeric_limits::max(), nullptr );
std::pair ctxSwitchLast = std::make_pair( std::numeric_limits::max(), nullptr );
@@ -251,8 +249,8 @@ private:
bool ctxUsageReady = false;
#endif
- flat_hash_map>> cpuTopology;
- flat_hash_map> cpuTopologyMap;
+ unordered_flat_map>> cpuTopology;
+ unordered_flat_map cpuTopologyMap;
};
struct MbpsBlock
@@ -353,7 +351,7 @@ public:
const CpuData* GetCpuData() const { return m_data.cpuData; }
int GetCpuDataCpuCount() const { return m_data.cpuDataCount; }
uint64_t GetPidFromTid( uint64_t tid ) const;
- const flat_hash_map>& GetCpuThreadData() const { return m_data.cpuThreadData; }
+ const unordered_flat_map& GetCpuThreadData() const { return m_data.cpuThreadData; }
void GetCpuUsageAtTime( int64_t time, int& own, int& other ) const;
int64_t GetFrameTime( const FrameData& fd, size_t idx ) const;
@@ -362,7 +360,7 @@ public:
const FrameImage* GetFrameImage( const FrameData& fd, size_t idx ) const;
std::pair GetFrameRange( const FrameData& fd, int64_t from, int64_t to );
- const flat_hash_map>& GetLockMap() const { return m_data.lockMap; }
+ const unordered_flat_map& GetLockMap() const { return m_data.lockMap; }
const Vector>& GetMessages() const { return m_data.messages; }
const Vector& GetGpuData() const { return m_data.gpuData; }
const Vector& GetPlots() const { return m_data.plots.Data(); }
@@ -411,7 +409,7 @@ public:
#ifndef TRACY_NO_STATISTICS
const SourceLocationZones& GetZonesForSourceLocation( int16_t srcloc ) const;
- const flat_hash_map>& GetSourceLocationZones() const { return m_data.sourceLocationZones; }
+ const unordered_flat_map& GetSourceLocationZones() const { return m_data.sourceLocationZones; }
bool AreSourceLocationZonesReady() const { return m_data.sourceLocationZonesReady; }
bool IsCpuUsageReady() const { return m_data.ctxUsageReady; }
#endif
@@ -673,15 +671,15 @@ private:
bool m_ignoreMemFreeFaults;
short_ptr m_gpuCtxMap[256];
- flat_hash_map> m_pendingCustomStrings;
+ unordered_flat_map m_pendingCustomStrings;
uint64_t m_pendingCallstackPtr = 0;
uint32_t m_pendingCallstackId;
- flat_hash_map> m_pendingSourceLocationPayload;
+ unordered_flat_map m_pendingSourceLocationPayload;
Vector m_sourceLocationQueue;
- flat_hash_map> m_sourceLocationShrink;
- flat_hash_map> m_threadMap;
- flat_hash_map> m_nextCallstack;
- flat_hash_map> m_pendingFrameImageData;
+ unordered_flat_map m_sourceLocationShrink;
+ unordered_flat_map m_threadMap;
+ unordered_flat_map m_nextCallstack;
+ unordered_flat_map m_pendingFrameImageData;
uint32_t m_pendingStrings;
uint32_t m_pendingThreads;
@@ -716,7 +714,7 @@ private:
Vector m_serverQueryQueue;
size_t m_serverQuerySpaceLeft;
- flat_hash_map m_frameImageStaging;
+ unordered_flat_map m_frameImageStaging;
char* m_frameImageBuffer = nullptr;
size_t m_frameImageBufferSize = 0;
char* m_frameImageCompressedBuffer = nullptr;
diff --git a/server/tracy_flat_hash_map.hpp b/server/tracy_flat_hash_map.hpp
deleted file mode 100644
index 725cc441..00000000
--- a/server/tracy_flat_hash_map.hpp
+++ /dev/null
@@ -1,1450 +0,0 @@
-// Copyright Malte Skarupke 2017.
-// Distributed under the Boost Software License, Version 1.0.
-// (See http://www.boost.org/LICENSE_1_0.txt)
-
-#pragma once
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "../common/TracyForceInline.hpp"
-
-#ifdef _MSC_VER
-#define SKA_NOINLINE(...) __declspec(noinline) __VA_ARGS__
-#else
-#define SKA_NOINLINE(...) __VA_ARGS__ __attribute__((noinline))
-#endif
-
-namespace tracy
-{
-struct prime_number_hash_policy;
-struct power_of_two_hash_policy;
-
-template
-struct nohash
-{
- size_t operator()( const T& v ) const { return (size_t)v; }
- typedef tracy::power_of_two_hash_policy hash_policy;
-};
-
-namespace detailv3
-{
-template
-struct functor_storage : Functor
-{
- functor_storage() = default;
- functor_storage(const Functor & functor)
- : Functor(functor)
- {
- }
- template
- Result operator()(Args &&... args)
- {
- return static_cast(*this)(std::forward(args)...);
- }
- template
- Result operator()(Args &&... args) const
- {
- return static_cast(*this)(std::forward(args)...);
- }
-};
-template
-struct functor_storage