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

Add cached thread retriever.

This commit is contained in:
Bartosz Taudul
2019-10-24 22:33:48 +02:00
parent 06bc802107
commit 5873561b54
2 changed files with 22 additions and 1 deletions
+7 -1
View File
@@ -482,11 +482,17 @@ private:
ThreadData* NoticeThreadReal( uint64_t thread );
ThreadData* NewThread( uint64_t thread );
ThreadData* NoticeThread( uint64_t thread )
tracy_force_inline ThreadData* NoticeThread( uint64_t thread )
{
if( m_data.threadDataLast.first == thread ) return m_data.threadDataLast.second;
return NoticeThreadReal( thread );
}
ThreadData* RetrieveThreadReal( uint64_t thread );
tracy_force_inline ThreadData* RetrieveThread( uint64_t thread )
{
if( m_data.threadDataLast.first == thread ) return m_data.threadDataLast.second;
return RetrieveThreadReal( thread );
}
tracy_force_inline void NewZone( ZoneEvent* zone, uint64_t thread );