From e60b2884f4c00f0991986407f882085bfdf1df5e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 18 Aug 2019 14:57:44 +0200 Subject: [PATCH] Mark local threads with different color. --- server/TracyView.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 978c4000..c7cd2ed1 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -10474,6 +10474,11 @@ void View::DrawCpuDataWindow() pdqsort_branchless( pid.second.tids.begin(), pid.second.tids.end() ); for( auto& tid : pid.second.tids ) { + const auto tidMatch = pidMatch && m_worker.IsThreadLocal( tid ); + if( tidMatch ) + { + ImGui::PushStyleColor( ImGuiCol_Text, ImVec4( 1.0f, 1.0f, 0.2f, 1.0f ) ); + } const auto& tit = ctd.find( tid ); assert( tit != ctd.end() ); ImGui::TextUnformatted( RealToString( tid, true ) ); @@ -10489,6 +10494,10 @@ void View::DrawCpuDataWindow() ImGui::SameLine(); ImGui::TextDisabled( "(%.2f%%)", double( tit->second.migrations ) / tit->second.runningRegions * 100 ); ImGui::NextColumn(); + if( tidMatch ) + { + ImGui::PopStyleColor(); + } } ImGui::TreePop(); ImGui::Separator();