1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Store lock map as flat_hash_map with pointer values.

This commit is contained in:
Bartosz Taudul
2019-03-16 02:09:50 +01:00
parent 5fbc14c487
commit 71e20e7e7f
3 changed files with 89 additions and 81 deletions
+2 -3
View File
@@ -3,7 +3,6 @@
#include <atomic>
#include <limits>
#include <map>
#include <stdexcept>
#include <string>
#include <thread>
@@ -170,7 +169,7 @@ private:
flat_hash_map<CallstackFrameId, CallstackFrameData*, CallstackFrameIdHash, CallstackFrameIdCompare> callstackFrameMap;
flat_hash_map<CallstackFrameData*, CallstackFrameId, RevFrameHash, RevFrameComp> revFrameMap;
std::map<uint32_t, LockMap> lockMap;
flat_hash_map<uint32_t, LockMap*, nohash<uint32_t>> lockMap;
flat_hash_map<uint64_t, uint16_t, nohash<uint64_t>> threadMap;
Vector<uint64_t> threadExpand;
@@ -260,7 +259,7 @@ public:
int64_t GetFrameEnd( const FrameData& fd, size_t idx ) const;
std::pair <int, int> GetFrameRange( const FrameData& fd, int64_t from, int64_t to );
const std::map<uint32_t, LockMap>& GetLockMap() const { return m_data.lockMap; }
const flat_hash_map<uint32_t, LockMap*, nohash<uint32_t>>& GetLockMap() const { return m_data.lockMap; }
const Vector<MessageData*>& GetMessages() const { return m_data.messages; }
const Vector<GpuCtxData*>& GetGpuData() const { return m_data.gpuData; }
const Vector<PlotData*>& GetPlots() const { return m_data.plots.Data(); }