mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Show which threads are blocking/blocked.
This commit is contained in:
parent
182f6533f3
commit
b965a1c936
@ -1660,11 +1660,36 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
ImGui::Text( "Thread \"%s\" has lock. No other threads are waiting.", GetThreadString( tid ) );
|
ImGui::Text( "Thread \"%s\" has lock. No other threads are waiting.", GetThreadString( tid ) );
|
||||||
break;
|
break;
|
||||||
case State::HasBlockingLock:
|
case State::HasBlockingLock:
|
||||||
ImGui::Text( "Thread \"%s\" has lock. Other threads are blocked.", GetThreadString( tid ) );
|
{
|
||||||
|
ImGui::Text( "Thread \"%s\" has lock. Other threads are blocked:", GetThreadString( tid ) );
|
||||||
|
auto it = next;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
--it;
|
||||||
|
if( (*it)->type == LockEvent::Type::Wait )
|
||||||
|
{
|
||||||
|
ImGui::Text( "\"%s\"", GetThreadString( (*it)->thread ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while( it != vbegin );
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case State::WaitLock:
|
case State::WaitLock:
|
||||||
ImGui::Text( "Thread \"%s\" is blocked by other threads.", GetThreadString( tid ) );
|
{
|
||||||
|
ImGui::Text( "Thread \"%s\" is blocked by other thread:", GetThreadString( tid ) );
|
||||||
|
auto it = vbegin;
|
||||||
|
--it;
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
if( (*it)->type == LockEvent::Type::Obtain )
|
||||||
|
{
|
||||||
|
ImGui::Text( "\"%s\"", GetThreadString( (*it)->thread ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
--it;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
assert( false );
|
assert( false );
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user