From ef287c8aaba8fbc0baceaae8183488048b0cafb6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 27 Aug 2019 23:17:53 +0200 Subject: [PATCH] Display external thread names of profiled program on CPU data timeline. --- server/TracyView.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index b08cee07..de2ff301 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4026,6 +4026,10 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover, { const auto pid = m_worker.GetPidFromTid( thread ); untracked = pid == m_worker.GetPid(); + if( untracked ) + { + txt = m_worker.GetExternalName( thread ).second; + } } } const auto pr0 = ( start - m_zvStart ) * pxns; @@ -4077,7 +4081,14 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover, } else { - TextFocused( "Program:", txt ); + if( untracked ) + { + TextFocused( "Program:", m_worker.GetCaptureProgram().c_str() ); + } + else + { + TextFocused( "Program:", txt ); + } ImGui::SameLine(); if( untracked ) {