From 2009f63e3239191374b3053d67625e35544331a3 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 18 Apr 2021 20:39:41 +0200 Subject: [PATCH] Group time/samples data by local and child. --- server/TracySourceView.cpp | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 73bf9716..f8496836 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -1434,10 +1434,16 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, const unordered_flat_ if( ImGui::IsItemHovered() ) { ImGui::BeginTooltip(); - if( fit->second.local ) TextFocused( "Local time:", TimeToString( fit->second.local * worker.GetSamplingPeriod() ) ); - if( fit->second.ext ) TextFocused( "Child time:", TimeToString( fit->second.ext * worker.GetSamplingPeriod() ) ); - if( fit->second.local ) TextFocused( "Local samples:", RealToString( fit->second.local ) ); - if( fit->second.ext ) TextFocused( "Child samples:", RealToString( fit->second.ext ) ); + if( fit->second.local ) + { + TextFocused( "Local time:", TimeToString( fit->second.local * worker.GetSamplingPeriod() ) ); + TextFocused( "Local samples:", RealToString( fit->second.local ) ); + } + if( fit->second.ext ) + { + TextFocused( "Child time:", TimeToString( fit->second.ext * worker.GetSamplingPeriod() ) ); + TextFocused( "Child samples:", RealToString( fit->second.ext ) ); + } ImGui::EndTooltip(); } ImGui::SameLine(); @@ -2535,10 +2541,16 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr if( m_font ) ImGui::PopFont(); ImGui::BeginTooltip(); - if( ipcnt.local ) TextFocused( "Local time:", TimeToString( ipcnt.local * worker.GetSamplingPeriod() ) ); - if( ipcnt.ext ) TextFocused( "Child time:", TimeToString( ipcnt.ext * worker.GetSamplingPeriod() ) ); - if( ipcnt.local ) TextFocused( "Local samples:", RealToString( ipcnt.local ) ); - if( ipcnt.ext ) TextFocused( "Child samples:", RealToString( ipcnt.ext ) ); + if( ipcnt.local ) + { + TextFocused( "Local time:", TimeToString( ipcnt.local * worker.GetSamplingPeriod() ) ); + TextFocused( "Local samples:", RealToString( ipcnt.local ) ); + } + if( ipcnt.ext ) + { + TextFocused( "Child time:", TimeToString( ipcnt.ext * worker.GetSamplingPeriod() ) ); + TextFocused( "Child samples:", RealToString( ipcnt.ext ) ); + } ImGui::Separator(); TextFocused( "Entry call stacks:", RealToString( stats.parents.size() ) ); ImGui::SameLine();