mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Store list of inline symbols.
This commit is contained in:
parent
a7fffe7e13
commit
1da1d31e1c
@ -1698,12 +1698,21 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
|||||||
Int24 size;
|
Int24 size;
|
||||||
f.Read9( symAddr, name, file, line, imageName, callFile, callLine, isInline, 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 } );
|
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
|
#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.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
|
#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.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
|
#endif
|
||||||
}
|
}
|
||||||
else if( fileVer >= FileVersion( 0, 6, 5 ) )
|
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; } );
|
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
|
#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 )
|
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;
|
if( !m_data.newSymbolsWereAdded ) m_data.newSymbolsWereAdded = true;
|
||||||
m_data.symbolLoc.push_back( SymbolLocation { ev.symAddr, it->second.size } );
|
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_pendingSymbols.erase( it );
|
||||||
m_pendingCustomStrings.erase( fit );
|
m_pendingCustomStrings.erase( fit );
|
||||||
|
@ -234,7 +234,9 @@ private:
|
|||||||
unordered_flat_map<uint64_t, SymbolData> symbolMap;
|
unordered_flat_map<uint64_t, SymbolData> symbolMap;
|
||||||
unordered_flat_map<uint64_t, SymbolStats> symbolStats;
|
unordered_flat_map<uint64_t, SymbolStats> symbolStats;
|
||||||
Vector<SymbolLocation> symbolLoc;
|
Vector<SymbolLocation> symbolLoc;
|
||||||
|
Vector<uint64_t> symbolLocInline;
|
||||||
bool newSymbolsWereAdded = false;
|
bool newSymbolsWereAdded = false;
|
||||||
|
bool newInlineSymbolsWereAdded = false;
|
||||||
|
|
||||||
#ifndef TRACY_NO_STATISTICS
|
#ifndef TRACY_NO_STATISTICS
|
||||||
unordered_flat_map<VarArray<CallstackFrameId>*, uint32_t, VarArrayHasher<CallstackFrameId>, VarArrayComparator<CallstackFrameId>> parentCallstackMap;
|
unordered_flat_map<VarArray<CallstackFrameId>*, uint32_t, VarArrayHasher<CallstackFrameId>, VarArrayComparator<CallstackFrameId>> parentCallstackMap;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user