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
+15
View File
@@ -2654,6 +2654,21 @@ ThreadData* Worker::NoticeThreadReal( uint64_t thread )
}
}
ThreadData* Worker::RetrieveThreadReal( uint64_t thread )
{
auto it = m_threadMap.find( thread );
if( it != m_threadMap.end() )
{
m_data.threadDataLast.first = thread;
m_data.threadDataLast.second = it->second;
return it->second;
}
else
{
return nullptr;
}
}
const ThreadData* Worker::GetThreadData( uint64_t tid ) const
{
auto it = m_threadMap.find( tid );