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

Compress external threads. Saves 4 bytes per ctx switch.

Dropped support for loading context switch data in previous versions of
traces.
This commit is contained in:
Bartosz Taudul
2019-08-19 23:09:58 +02:00
parent 21e7a4bb16
commit 1712431dfd
5 changed files with 24 additions and 38 deletions
+2
View File
@@ -194,6 +194,7 @@ private:
flat_hash_map<uint32_t, LockMap*, nohash<uint32_t>> lockMap;
ThreadCompress localThreadCompress;
ThreadCompress externalThreadCompress;
std::pair<uint64_t, ThreadData*> threadDataLast;
Vector<Vector<ZoneEvent*>> zoneChildren;
@@ -359,6 +360,7 @@ public:
tracy_force_inline uint16_t CompressThread( uint64_t thread ) { return m_data.localThreadCompress.CompressThread( thread ); }
tracy_force_inline uint64_t DecompressThread( uint16_t thread ) const { return m_data.localThreadCompress.DecompressThread( thread ); }
tracy_force_inline uint64_t DecompressThreadExternal( uint16_t thread ) const { return m_data.externalThreadCompress.DecompressThread( thread ); }
std::shared_mutex& GetMbpsDataLock() { return m_mbpsData.lock; }
const std::vector<float>& GetMbpsData() const { return m_mbpsData.mbps; }