mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
Assembly display is not dependant on sample data.
This commit is contained in:
parent
2a54f2df5d
commit
10ca8b5440
@ -130,11 +130,6 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
|
||||
|
||||
void SourceView::Render( const Worker& worker )
|
||||
{
|
||||
uint32_t iptotal = 0;
|
||||
unordered_flat_map<uint64_t, uint32_t> ipcount;
|
||||
auto ipmap = m_symAddr != 0 ? worker.GetSymbolInstructionPointers( m_symAddr ) : nullptr;
|
||||
if( ipmap )
|
||||
{
|
||||
if( !m_asm.empty() )
|
||||
{
|
||||
if( SmallCheckbox( ICON_FA_MICROCHIP " Show assembly", &m_showAsm ) )
|
||||
@ -148,7 +143,17 @@ void SourceView::Render( const Worker& worker )
|
||||
m_targetLine = m_selectedLine;
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
TextFocused( "Code size:", MemSizeToString( m_codeLen ) );
|
||||
}
|
||||
|
||||
uint32_t iptotal = 0;
|
||||
unordered_flat_map<uint64_t, uint32_t> ipcount;
|
||||
auto ipmap = m_symAddr != 0 ? worker.GetSymbolInstructionPointers( m_symAddr ) : nullptr;
|
||||
if( ipmap )
|
||||
{
|
||||
if( m_showAsm )
|
||||
{
|
||||
for( auto& ip : *ipmap )
|
||||
@ -184,26 +189,24 @@ void SourceView::Render( const Worker& worker )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( iptotal > 0 )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
TextFocused( "Samples:", RealToString( iptotal ) );
|
||||
}
|
||||
}
|
||||
|
||||
auto sym = worker.GetSymbolData( m_symAddr );
|
||||
if( sym )
|
||||
{
|
||||
if( !m_asm.empty() )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
TextFocused( "Code size:", MemSizeToString( m_codeLen ) );
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
}
|
||||
TextFocused( "Samples:", RealToString( iptotal ) );
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
TextFocused( "Symbol:", worker.GetString( sym->name ) );
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::BeginChild( "##sourceView", ImVec2( 0, 0 ), true );
|
||||
if( m_font ) ImGui::PushFont( m_font );
|
||||
|
Loading…
x
Reference in New Issue
Block a user