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

Track thread context.

This change exploits the fact that events are processed in batches
originating from a single thread. A single message changing thread
context is enough to handle multiple messages, as opposed to inclusion
of thread identifier in each message.
This commit is contained in:
Bartosz Taudul
2019-08-02 20:18:08 +02:00
parent 9b6c405485
commit 12969ee497
6 changed files with 120 additions and 134 deletions
+3
View File
@@ -361,6 +361,7 @@ private:
tracy_force_inline bool DispatchProcess( const QueueItem& ev, char*& ptr );
tracy_force_inline bool Process( const QueueItem& ev );
tracy_force_inline void ProcessThreadContext( const QueueThreadContext& ev );
tracy_force_inline void ProcessZoneBegin( const QueueZoneBegin& ev );
tracy_force_inline void ProcessZoneBeginCallstack( const QueueZoneBegin& ev );
tracy_force_inline void ProcessZoneBeginAllocSrcLoc( const QueueZoneBegin& ev );
@@ -551,6 +552,8 @@ private:
flat_hash_map<uint64_t, int32_t> m_frameImageStaging;
char* m_frameImageBuffer = nullptr;
size_t m_frameImageBufferSize = 0;
uint64_t m_threadCtx = 0;
};
}