mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Show only relevant options in asm view.
This commit is contained in:
parent
3fbc2c8036
commit
71d789063e
@ -1599,44 +1599,48 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<u
|
|||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
SmallCheckbox( ICON_FA_SHARE " Jumps", &m_showJumps );
|
SmallCheckbox( ICON_FA_SHARE " Jumps", &m_showJumps );
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::SameLine();
|
|
||||||
if( SmallCheckbox( "AT&T", &m_atnt ) ) Disassemble( m_baseAddr, worker );
|
|
||||||
|
|
||||||
if( m_cpuArch == CpuArchX64 || m_cpuArch == CpuArchX86 )
|
if( m_cpuArch == CpuArchX64 || m_cpuArch == CpuArchX86 )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
float mw = 0;
|
if( SmallCheckbox( "AT&T", &m_atnt ) ) Disassemble( m_baseAddr, worker );
|
||||||
for( auto& v : s_uArchUx )
|
|
||||||
|
if( !m_atnt )
|
||||||
{
|
{
|
||||||
const auto w = ImGui::CalcTextSize( v.uArch ).x;
|
ImGui::SameLine();
|
||||||
if( w > mw ) mw = w;
|
ImGui::Spacing();
|
||||||
}
|
ImGui::SameLine();
|
||||||
ImGui::TextUnformatted( ICON_FA_MICROCHIP " \xce\xbc""arch:" );
|
float mw = 0;
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::SetNextItemWidth( mw + ImGui::GetFontSize() );
|
|
||||||
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) );
|
|
||||||
if( ImGui::BeginCombo( "##uarch", s_uArchUx[m_selMicroArch].uArch, ImGuiComboFlags_HeightLarge ) )
|
|
||||||
{
|
|
||||||
int idx = 0;
|
|
||||||
for( auto& v : s_uArchUx )
|
for( auto& v : s_uArchUx )
|
||||||
{
|
{
|
||||||
if( ImGui::Selectable( v.uArch, idx == m_selMicroArch ) ) SelectMicroArchitecture( v.moniker );
|
const auto w = ImGui::CalcTextSize( v.uArch ).x;
|
||||||
ImGui::SameLine();
|
if( w > mw ) mw = w;
|
||||||
TextDisabledUnformatted( v.cpuName );
|
|
||||||
idx++;
|
|
||||||
}
|
}
|
||||||
ImGui::EndCombo();
|
ImGui::TextUnformatted( ICON_FA_MICROCHIP " \xce\xbc""arch:" );
|
||||||
}
|
ImGui::SameLine();
|
||||||
ImGui::PopStyleVar();
|
ImGui::SetNextItemWidth( mw + ImGui::GetFontSize() );
|
||||||
|
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) );
|
||||||
|
if( ImGui::BeginCombo( "##uarch", s_uArchUx[m_selMicroArch].uArch, ImGuiComboFlags_HeightLarge ) )
|
||||||
|
{
|
||||||
|
int idx = 0;
|
||||||
|
for( auto& v : s_uArchUx )
|
||||||
|
{
|
||||||
|
if( ImGui::Selectable( v.uArch, idx == m_selMicroArch ) ) SelectMicroArchitecture( v.moniker );
|
||||||
|
ImGui::SameLine();
|
||||||
|
TextDisabledUnformatted( v.cpuName );
|
||||||
|
idx++;
|
||||||
|
}
|
||||||
|
ImGui::EndCombo();
|
||||||
|
}
|
||||||
|
ImGui::PopStyleVar();
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
SmallCheckbox( ICON_FA_TRUCK_LOADING " Latency", &m_showLatency );
|
SmallCheckbox( ICON_FA_TRUCK_LOADING " Latency", &m_showLatency );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TRACY_NO_FILESELECTOR
|
#ifndef TRACY_NO_FILESELECTOR
|
||||||
|
Loading…
Reference in New Issue
Block a user