From 7cfaaf631033eb561c762d613f6be6a92efb71d1 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 29 Apr 2021 02:19:32 +0200 Subject: [PATCH] Exactly known latency shouldn't vary. --- server/TracySourceView.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index e26042b9..46819a61 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -3042,6 +3042,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr TextDisabledUnformatted( "(cycles per instruction, lower is better)" ); if( var.maxlat >= 0 ) { + bool exact = false; TextDisabledUnformatted( "Latency:" ); ImGui::SameLine(); if( var.minlat == var.maxlat && var.minbound == var.maxbound ) @@ -3053,6 +3054,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr else { ImGui::TextUnformatted( RealToString( var.minlat ) ); + exact = true; } } else @@ -3076,7 +3078,14 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr } } ImGui::SameLine(); - TextDisabledUnformatted( "(cycles in execution, may vary by used output)" ); + if( exact ) + { + TextDisabledUnformatted( "(cycles in execution)" ); + } + else + { + TextDisabledUnformatted( "(cycles in execution, may vary by used output)" ); + } } TextFocused( "\xce\xbcops:", RealToString( var.uops ) ); if( var.port != -1 ) TextFocused( "Ports:", PortList[var.port] );