Display external thread names of profiled program on CPU data timeline.

This commit is contained in:
Bartosz Taudul 2019-08-27 23:17:53 +02:00
parent 8eb7220dd7
commit ef287c8aab

View File

@ -4026,6 +4026,10 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
{ {
const auto pid = m_worker.GetPidFromTid( thread ); const auto pid = m_worker.GetPidFromTid( thread );
untracked = pid == m_worker.GetPid(); untracked = pid == m_worker.GetPid();
if( untracked )
{
txt = m_worker.GetExternalName( thread ).second;
}
} }
} }
const auto pr0 = ( start - m_zvStart ) * pxns; const auto pr0 = ( start - m_zvStart ) * pxns;
@ -4077,7 +4081,14 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
} }
else else
{ {
TextFocused( "Program:", txt ); if( untracked )
{
TextFocused( "Program:", m_worker.GetCaptureProgram().c_str() );
}
else
{
TextFocused( "Program:", txt );
}
ImGui::SameLine(); ImGui::SameLine();
if( untracked ) if( untracked )
{ {