Don't build inline symbols list, if not needed.

This commit is contained in:
Bartosz Taudul 2020-04-12 16:05:49 +02:00
parent 633902cce5
commit de18dd46b6

View File

@ -406,23 +406,23 @@ void SourceView::RenderSymbolView( const Worker& worker )
auto inlineList = worker.GetInlineSymbolList( m_baseAddr, m_codeLen ); auto inlineList = worker.GetInlineSymbolList( m_baseAddr, m_codeLen );
if( inlineList ) if( inlineList )
{ {
const auto symEnd = m_baseAddr + m_codeLen;
Vector<uint64_t> symInline( m_baseAddr );
while( *inlineList < symEnd )
{
if( *inlineList != m_baseAddr )
{
symInline.push_back_non_empty( *inlineList );
}
inlineList++;
}
SmallCheckbox( ICON_FA_SITEMAP " Function:", &m_calcInlineStats ); SmallCheckbox( ICON_FA_SITEMAP " Function:", &m_calcInlineStats );
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth( -1 ); ImGui::SetNextItemWidth( -1 );
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) ); ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) );
if( ImGui::BeginCombo( "##functionList", worker.GetString( sym->name ), ImGuiComboFlags_HeightLarge ) ) if( ImGui::BeginCombo( "##functionList", worker.GetString( sym->name ), ImGuiComboFlags_HeightLarge ) )
{ {
const auto symEnd = m_baseAddr + m_codeLen;
Vector<uint64_t> symInline( m_baseAddr );
while( *inlineList < symEnd )
{
if( *inlineList != m_baseAddr )
{
symInline.push_back_non_empty( *inlineList );
}
inlineList++;
}
ImGui::Columns( 3 ); ImGui::Columns( 3 );
static bool widthSet = false; static bool widthSet = false;
if( !widthSet ) if( !widthSet )