Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-08-16 20:30:46 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-08-16 20:30:46 +0300
commitedd5338faad07044180ee1637446fe88f9607a45 (patch)
treebed1c1c7cb3dfa2872c87488c087ec8bf0f17778 /server/TracyView.cpp
parentccaf92afc45070fa6b5d50e403e8d3133eea4f8e (diff)
Display untracked threads.
Diffstat (limited to 'server/TracyView.cpp')
-rw-r--r--server/TracyView.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/server/TracyView.cpp b/server/TracyView.cpp
index e7d0d992..f10abcce 100644
--- a/server/TracyView.cpp
+++ b/server/TracyView.cpp
@@ -3972,14 +3972,15 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
{
const auto thread = it->Thread();
const auto local = m_worker.IsThreadLocal( thread );
+ auto txt = local ? m_worker.GetThreadString( thread ) : m_worker.GetExternalName( thread );
+ const bool untracked = !local && strcmp( txt, m_worker.GetCaptureProgram().c_str() ) == 0;
const auto pr0 = ( start - m_zvStart ) * pxns;
const auto pr1 = ( end - m_zvStart ) * pxns;
const auto px0 = std::max( pr0, -10.0 );
const auto px1 = std::max( { std::min( pr1, double( w + 10 ) ), px0 + pxns * 0.5, px0 + MinVisSize } );
- draw->AddRectFilled( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + sty ), local ? 0xFF334488 : 0xFF444444 );
- draw->AddRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + sty ), local ? 0xFF5566AA : 0xFF666666 );
+ draw->AddRectFilled( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + sty ), local ? 0xFF334488 : ( untracked ? 0xFF663333 : 0xFF444444 ) );
+ draw->AddRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + sty ), local ? 0xFF5566AA : ( untracked ? 0xFF885555 : 0xFF666666 ) );
- auto txt = local ? m_worker.GetThreadString( thread ) : m_worker.GetExternalName( thread );
auto tsz = ImGui::CalcTextSize( txt );
if( tsz.x < zsz )
{
@@ -4022,7 +4023,14 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
{
TextFocused( "Program:", txt );
ImGui::SameLine();
- TextDisabledUnformatted( "(external)" );
+ if( untracked )
+ {
+ TextDisabledUnformatted( "(untracked thread in profiled program)" );
+ }
+ else
+ {
+ TextDisabledUnformatted( "(external)" );
+ }
}
ImGui::Separator();
TextFocused( "Start time:", TimeToString( start ) );