Exactly known latency shouldn't vary.

This commit is contained in:
Bartosz Taudul 2021-04-29 02:19:32 +02:00
parent 9bc3afabe7
commit 7cfaaf6310
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -3042,6 +3042,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
TextDisabledUnformatted( "(cycles per instruction, lower is better)" ); TextDisabledUnformatted( "(cycles per instruction, lower is better)" );
if( var.maxlat >= 0 ) if( var.maxlat >= 0 )
{ {
bool exact = false;
TextDisabledUnformatted( "Latency:" ); TextDisabledUnformatted( "Latency:" );
ImGui::SameLine(); ImGui::SameLine();
if( var.minlat == var.maxlat && var.minbound == var.maxbound ) if( var.minlat == var.maxlat && var.minbound == var.maxbound )
@ -3053,6 +3054,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
else else
{ {
ImGui::TextUnformatted( RealToString( var.minlat ) ); ImGui::TextUnformatted( RealToString( var.minlat ) );
exact = true;
} }
} }
else else
@ -3076,8 +3078,15 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
} }
} }
ImGui::SameLine(); ImGui::SameLine();
if( exact )
{
TextDisabledUnformatted( "(cycles in execution)" );
}
else
{
TextDisabledUnformatted( "(cycles in execution, may vary by used output)" ); TextDisabledUnformatted( "(cycles in execution, may vary by used output)" );
} }
}
TextFocused( "\xce\xbcops:", RealToString( var.uops ) ); TextFocused( "\xce\xbcops:", RealToString( var.uops ) );
if( var.port != -1 ) TextFocused( "Ports:", PortList[var.port] ); if( var.port != -1 ) TextFocused( "Ports:", PortList[var.port] );
ImGui::Separator(); ImGui::Separator();