From 4e6a1bae220070684440a98b4217cd718a66ba97 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 20 Jun 2021 00:04:08 +0200 Subject: [PATCH] Don't display time for hw samples. --- server/TracySourceView.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 10208090..9b94659d 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -2648,8 +2648,15 @@ void SourceView::RenderLine( const Tokenizer::Line& line, int lineNum, const Add ImGui::BeginTooltip(); if( ipcnt.local ) { - if( worker ) TextFocused( "Local time:", TimeToString( ipcnt.local * worker->GetSamplingPeriod() ) ); - TextFocused( "Local samples:", RealToString( ipcnt.local ) ); + if( m_cost == 0 ) + { + if( worker ) TextFocused( "Local time:", TimeToString( ipcnt.local * worker->GetSamplingPeriod() ) ); + TextFocused( "Local samples:", RealToString( ipcnt.local ) ); + } + else + { + TextFocused( "Events:", RealToString( ipcnt.local ) ); + } } if( ipcnt.ext ) { @@ -2924,8 +2931,15 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr ImGui::BeginTooltip(); if( ipcnt.local ) { - TextFocused( "Local time:", TimeToString( ipcnt.local * worker.GetSamplingPeriod() ) ); - TextFocused( "Local samples:", RealToString( ipcnt.local ) ); + if( m_cost == 0 ) + { + TextFocused( "Local time:", TimeToString( ipcnt.local * worker.GetSamplingPeriod() ) ); + TextFocused( "Local samples:", RealToString( ipcnt.local ) ); + } + else + { + TextFocused( "Events:", RealToString( ipcnt.local ) ); + } } if( ipcnt.ext ) {