diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 8e129b90..9c5a6d1b 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1698,12 +1698,21 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) Int24 size; f.Read9( symAddr, name, file, line, imageName, callFile, callLine, isInline, size ); m_data.symbolMap.emplace( symAddr, SymbolData { name, file, line, imageName, callFile, callLine, isInline, size } ); - if( !isInline ) m_data.symbolLoc.push_back( SymbolLocation { symAddr, size.Val() } ); + if( isInline ) + { + m_data.symbolLocInline.push_back( symAddr ); + } + else + { + m_data.symbolLoc.push_back( SymbolLocation { symAddr, size.Val() } ); + } } #ifdef NO_PARALLEL_SORT pdqsort_branchless( m_data.symbolLoc.begin(), m_data.symbolLoc.end(), [] ( const auto& l, const auto& r ) { return l.addr < r.addr; } ); + pdqsort_branchless( m_data.symbolLocInline.begin(), m_data.symbolLocInline.end() ); #else std::sort( std::execution::par_unseq, m_data.symbolLoc.begin(), m_data.symbolLoc.end(), [] ( const auto& l, const auto& r ) { return l.addr < r.addr; } ); + std::sort( std::execution::par_unseq, m_data.symbolLocInline.begin(), m_data.symbolLocInline.end() ); #endif } else if( fileVer >= FileVersion( 0, 6, 5 ) ) @@ -2918,6 +2927,15 @@ void Worker::Exec() std::sort( std::execution::par_unseq, m_data.symbolLoc.begin(), m_data.symbolLoc.end(), [] ( const auto& l, const auto& r ) { return l.addr < r.addr; } ); #endif } + if( m_data.newInlineSymbolsWereAdded ) + { + m_data.newInlineSymbolsWereAdded = false; +#ifdef NO_PARALLEL_SORT + pdqsort_branchless( m_data.symbolLocInline.begin(), m_data.symbolLocInline.end() ); +#else + std::sort( std::execution::par_unseq, m_data.symbolLocInline.begin(), m_data.symbolLocInline.end() ); +#endif + } if( !m_serverQueryQueue.empty() && m_serverQuerySpaceLeft > 0 ) { @@ -5579,6 +5597,11 @@ void Worker::ProcessSymbolInformation( const QueueSymbolInformation& ev ) if( !m_data.newSymbolsWereAdded ) m_data.newSymbolsWereAdded = true; m_data.symbolLoc.push_back( SymbolLocation { ev.symAddr, it->second.size } ); } + else + { + if( !m_data.newInlineSymbolsWereAdded ) m_data.newInlineSymbolsWereAdded = true; + m_data.symbolLocInline.push_back( ev.symAddr ); + } m_pendingSymbols.erase( it ); m_pendingCustomStrings.erase( fit ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index af7e6044..6a9beaf4 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -234,7 +234,9 @@ private: unordered_flat_map symbolMap; unordered_flat_map symbolStats; Vector symbolLoc; + Vector symbolLocInline; bool newSymbolsWereAdded = false; + bool newInlineSymbolsWereAdded = false; #ifndef TRACY_NO_STATISTICS unordered_flat_map*, uint32_t, VarArrayHasher, VarArrayComparator> parentCallstackMap;