From ea604d484dbcb2055d32e56d6acbd492898cb513 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Dec 2017 20:53:20 +0100 Subject: [PATCH] Don't show mutex as blocked, if there are no locks held. --- server/TracyView.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 5d4c0dc0..05b1accb 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3067,7 +3067,14 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos, } case LockState::WaitLock: { - ImGui::Text( "Thread \"%s\" is blocked by other thread:", GetThreadString( tid ) ); + if( (*vbegin)->lockCount > 0 ) + { + ImGui::Text( "Thread \"%s\" is blocked by other thread:", GetThreadString( tid ) ); + } + else + { + ImGui::Text( "Thread \"%s\" waits to obtain lock after release by thread:", GetThreadString( tid ) ); + } ImGui::Indent( ty ); ImGui::Text( "\"%s\"", GetThreadString( lockmap.threadList[(*vbegin)->lockingThread] ) ); ImGui::Unindent( ty );