mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Display code size in source file view window.
This commit is contained in:
parent
6a96b5f1dc
commit
3de4283bd2
@ -26,6 +26,7 @@ SourceView::SourceView( ImFont* font )
|
|||||||
, m_targetLine( 0 )
|
, m_targetLine( 0 )
|
||||||
, m_selectedLine( 0 )
|
, m_selectedLine( 0 )
|
||||||
, m_showAsm( false )
|
, m_showAsm( false )
|
||||||
|
, m_codeLen( 0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,6 +126,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
|
|||||||
cs_free( insn, cnt );
|
cs_free( insn, cnt );
|
||||||
}
|
}
|
||||||
cs_close( &handle );
|
cs_close( &handle );
|
||||||
|
m_codeLen = len;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,6 +198,10 @@ void SourceView::Render( const Worker& worker )
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
TextFocused( "Code size:", MemSizeToString( m_codeLen ) );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::SameLine();
|
||||||
}
|
}
|
||||||
TextFocused( "Samples:", RealToString( iptotal ) );
|
TextFocused( "Samples:", RealToString( iptotal ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -45,6 +45,7 @@ private:
|
|||||||
int m_targetLine;
|
int m_targetLine;
|
||||||
int m_selectedLine;
|
int m_selectedLine;
|
||||||
bool m_showAsm;
|
bool m_showAsm;
|
||||||
|
uint32_t m_codeLen;
|
||||||
|
|
||||||
std::vector<Line> m_lines;
|
std::vector<Line> m_lines;
|
||||||
std::vector<AsmLine> m_asm;
|
std::vector<AsmLine> m_asm;
|
||||||
|
Loading…
Reference in New Issue
Block a user