From db48cd6c1f5a4af28518de50268145ca6207e738 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 26 Oct 2017 00:42:16 +0200 Subject: [PATCH] Display threads that have acquired a lock. --- server/TracyView.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 19de60c9..faebb63f 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2474,6 +2474,18 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos, char buf[1024]; sprintf( buf, "%" PRIu64 ": %s", v.first, GetString( srcloc.function ) ); draw->AddText( wpos + ImVec2( 0, offset ), 0xFF8888FF, buf ); + if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( 0, offset ), wpos + ImVec2( ty + ImGui::CalcTextSize( buf ).x, offset + ty ) ) ) + { + ImGui::BeginTooltip(); + ImGui::Text( "Thread list:" ); + ImGui::Indent( ty ); + for( auto& t : v.second.threadList ) + { + ImGui::Text( "%s", GetThreadString( t ) ); + } + ImGui::Unindent( ty ); + ImGui::EndTooltip(); + } cnt++; } }