diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index debe9c03..272c6139 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -825,6 +825,24 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map> ipData; ipData.reserve( ipcount.size() ); for( auto& v : ipcount ) ipData.emplace_back( v.first, v.second ); + for( uint32_t lineNum = 1; lineNum <= m_lines.size(); lineNum++ ) + { + if( ipcount.find( lineNum ) == ipcount.end() ) + { + auto addresses = worker.GetAddressesForLocation( m_fileStringIdx, lineNum ); + if( addresses ) + { + for( auto& addr : *addresses ) + { + if( addr >= m_baseAddr && addr < m_baseAddr + m_codeLen ) + { + ipData.emplace_back( lineNum, 0 ); + break; + } + } + } + } + } pdqsort_branchless( ipData.begin(), ipData.end(), []( const auto& l, const auto& r ) { return l.first < r.first; } ); const auto step = uint32_t( m_lines.size() * 2 / rect.GetHeight() ); @@ -842,7 +860,7 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_mapAddRectFilled( ImVec2( x14, ly ), ImVec2( x34, ly+3 ), color ); }