Mirror thread data in a reorderable vector.

This commit is contained in:
Bartosz Taudul 2019-03-24 13:37:43 +01:00
parent 6ad820a76a
commit e957590350
2 changed files with 13 additions and 2 deletions

View File

@ -1979,10 +1979,20 @@ void View::DrawZones()
}
}
auto& crash = m_worker.GetCrashEvent();
// zones
const auto& threadData = m_worker.GetThreadData();
if( threadData.size() != m_threadOrder.size() )
{
m_threadOrder.reserve( threadData.size() );
for( int i=m_threadOrder.size(); i<threadData.size(); i++ )
{
m_threadOrder.push_back( threadData[i] );
}
}
auto& crash = m_worker.GetCrashEvent();
LockHighlight nextLockHighlight { -1 };
for( const auto& v : m_worker.GetThreadData() )
for( const auto& v : m_threadOrder )
{
auto& vis = Vis( v );
if( !vis.visible )

View File

@ -193,6 +193,7 @@ private:
flat_hash_map<uint64_t, bool, nohash<uint64_t>> m_visibleMsgThread;
flat_hash_map<const void*, int, nohash<const void*>> m_gpuDrift;
flat_hash_map<const PlotData*, PlotView, nohash<const PlotData*>> m_plotView;
Vector<const ThreadData*> m_threadOrder;
tracy_force_inline VisData& Vis( const void* ptr )
{