mirror of
https://github.com/wolfpld/tracy
synced 2025-05-07 15:33:52 +00:00
Display lock and wait counts.
This commit is contained in:
parent
339c177ee8
commit
011253ac47
@ -2380,11 +2380,25 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
||||
switch( state )
|
||||
{
|
||||
case State::HasLock:
|
||||
if( (*vbegin)->lockCount == 1 )
|
||||
{
|
||||
ImGui::Text( "Thread \"%s\" has lock. No other threads are waiting.", GetThreadString( tid ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::Text( "Thread \"%s\" has %i locks. No other threads are waiting.", GetThreadString( tid ), (*vbegin)->lockCount );
|
||||
}
|
||||
break;
|
||||
case State::HasBlockingLock:
|
||||
{
|
||||
ImGui::Text( "Thread \"%s\" has lock. Other threads are blocked:", GetThreadString( tid ) );
|
||||
if( (*vbegin)->lockCount == 1 )
|
||||
{
|
||||
ImGui::Text( "Thread \"%s\" has lock. Blocked threads (%i):", GetThreadString( tid ), CountBits( (*vbegin)->waitList ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::Text( "Thread \"%s\" has %i locks. Blocked threads (%i):", GetThreadString( tid ), (*vbegin)->lockCount, CountBits( (*vbegin)->waitList ) );
|
||||
}
|
||||
auto waitList = (*vbegin)->waitList;
|
||||
int t = 0;
|
||||
while( waitList != 0 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user