1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Hide "propagate inlines" checkbox if there are no inlined functions.

This commit is contained in:
Bartosz Taudul 2024-05-25 12:54:12 +02:00
parent 071d440955
commit 0333b9f591
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 5 additions and 5 deletions

View File

@ -1717,14 +1717,14 @@ void SourceView::RenderSymbolView( Worker& worker, View& view )
switch( m_displayMode )
{
case DisplaySource:
RenderSymbolSourceView( as, worker, view );
RenderSymbolSourceView( as, worker, view, inlineList != nullptr );
break;
case DisplayAsm:
jumpOut = RenderSymbolAsmView( as, worker, view );
break;
case DisplayMixed:
ImGui::Columns( 2 );
RenderSymbolSourceView( as, worker, view );
RenderSymbolSourceView( as, worker, view, inlineList != nullptr );
ImGui::NextColumn();
jumpOut = RenderSymbolAsmView( as, worker, view );
ImGui::EndColumns();
@ -1845,10 +1845,10 @@ static uint32_t GetGoodnessColor( float inRatio )
return GoodnessColor[ratio];
}
void SourceView::RenderSymbolSourceView( const AddrStatData& as, Worker& worker, const View& view )
void SourceView::RenderSymbolSourceView( const AddrStatData& as, Worker& worker, const View& view, bool hasInlines )
{
const auto scale = GetScale();
if( !m_calcInlineStats && ( as.ipTotalAsm.local + as.ipTotalAsm.ext ) > 0 || ( view.m_statRange.active && worker.GetSamplesForSymbol( m_baseAddr ) ) )
if( hasInlines && !m_calcInlineStats && ( as.ipTotalAsm.local + as.ipTotalAsm.ext ) > 0 || ( view.m_statRange.active && worker.GetSamplesForSymbol( m_baseAddr ) ) )
{
const auto samplesReady = worker.AreSymbolSamplesReady();
if( !samplesReady )

View File

@ -183,7 +183,7 @@ private:
void RenderSimpleSourceView();
void RenderSymbolView( Worker& worker, View& view );
void RenderSymbolSourceView( const AddrStatData& as, Worker& worker, const View& view );
void RenderSymbolSourceView( const AddrStatData& as, Worker& worker, const View& view, bool hasInlines );
uint64_t RenderSymbolAsmView( const AddrStatData& as, Worker& worker, View& view );
void RenderLine( const Tokenizer::Line& line, int lineNum, const AddrStat& ipcnt, const AddrStatData& as, Worker* worker, const View* view );