mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 09:14:36 +00:00
Display jump target in asm instruction tooltip.
This commit is contained in:
parent
ac9b97319a
commit
854439cdb1
@ -3043,11 +3043,25 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
const auto& var = *asmVar;
|
const auto& var = *asmVar;
|
||||||
if( m_font ) ImGui::PopFont();
|
if( m_font ) ImGui::PopFont();
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
if( opdesc != 0 )
|
if( jumpName || opdesc != 0 )
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted( OpDescList[opdesc] );
|
if( opdesc != 0 ) ImGui::TextUnformatted( OpDescList[opdesc] );
|
||||||
|
if( jumpName )
|
||||||
|
{
|
||||||
|
if( jumpBase == m_baseAddr )
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( "Local target:" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( "External target:" );
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
|
||||||
|
}
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFocused( "Throughput:", RealToString( var.tp ) );
|
TextFocused( "Throughput:", RealToString( var.tp ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(cycles per instruction, lower is better)" );
|
TextDisabledUnformatted( "(cycles per instruction, lower is better)" );
|
||||||
@ -3154,6 +3168,23 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
if( m_font ) ImGui::PushFont( m_font );
|
if( m_font ) ImGui::PushFont( m_font );
|
||||||
}
|
}
|
||||||
|
else if( jumpName )
|
||||||
|
{
|
||||||
|
if( m_font ) ImGui::PopFont();
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
if( jumpBase == m_baseAddr )
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( "Local target:" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( "External target:" );
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
if( m_font ) ImGui::PushFont( m_font );
|
||||||
|
}
|
||||||
if( m_cpuArch == CpuArchX86 || m_cpuArch == CpuArchX64 )
|
if( m_cpuArch == CpuArchX86 || m_cpuArch == CpuArchX64 )
|
||||||
{
|
{
|
||||||
if( line.readX86[0] != RegsX86::invalid || line.writeX86[0] != RegsX86::invalid )
|
if( line.readX86[0] != RegsX86::invalid || line.writeX86[0] != RegsX86::invalid )
|
||||||
|
Loading…
Reference in New Issue
Block a user