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

Allow limiting wait stacks to certain threads.

This commit is contained in:
Bartosz Taudul
2021-11-13 18:20:06 +01:00
parent 265a39e7c9
commit 94d4272c9c
2 changed files with 127 additions and 44 deletions
+11
View File
@@ -313,6 +313,7 @@ private:
unordered_flat_map<const void*, VisData> m_visData;
unordered_flat_map<uint64_t, bool> m_visibleMsgThread;
unordered_flat_map<uint64_t, bool> m_waitStackThread;
unordered_flat_map<const void*, int> m_gpuDrift;
unordered_flat_map<const PlotData*, PlotView> m_plotView;
Vector<const ThreadData*> m_threadOrder;
@@ -338,6 +339,16 @@ private:
return it->second;
}
tracy_force_inline bool& WaitStackThread( uint64_t thread )
{
auto it = m_waitStackThread.find( thread );
if( it == m_waitStackThread.end() )
{
it = m_waitStackThread.emplace( thread, true ).first;
}
return it->second;
}
tracy_force_inline int& GpuDrift( const void* ptr )
{
auto it = m_gpuDrift.find( ptr );