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

Don't send symbol name.

This commit is contained in:
Bartosz Taudul 2020-02-27 12:49:48 +01:00
parent 9d718eb1e8
commit be5793987e
4 changed files with 16 additions and 12 deletions

View File

@ -2690,10 +2690,9 @@ void Profiler::HandleSymbolQuery( uint64_t symbol )
QueueItem item;
MemWrite( &item.hdr.type, QueueType::SymbolInformation );
MemWrite( &item.callstackFrame.file, uint64_t( sym.file ) );
MemWrite( &item.callstackFrame.name, uint64_t( sym.name ) );
MemWrite( &item.callstackFrame.line, sym.line );
MemWrite( &item.callstackFrame.symAddr, symbol );
MemWrite( &item.symbolInformation.file, uint64_t( sym.file ) );
MemWrite( &item.symbolInformation.line, sym.line );
MemWrite( &item.symbolInformation.symAddr, symbol );
AppendData( &item, QueueDataSize[(int)QueueType::SymbolInformation] );

View File

@ -314,6 +314,13 @@ struct QueueCallstackFrame
uint64_t symAddr;
};
struct QueueSymbolInformation
{
uint64_t file;
uint32_t line;
uint64_t symAddr;
};
struct QueueCrashReport
{
int64_t time;
@ -420,6 +427,7 @@ struct QueueItem
QueueCallstackSample callstackSample;
QueueCallstackFrameSize callstackFrameSize;
QueueCallstackFrame callstackFrame;
QueueSymbolInformation symbolInformation;
QueueCrashReport crashReport;
QueueSysTime sysTime;
QueueContextSwitch contextSwitch;
@ -449,7 +457,7 @@ static constexpr size_t QueueDataSize[] = {
sizeof( QueueHeader ) + sizeof( QueueCallstack ),
sizeof( QueueHeader ) + sizeof( QueueCallstackAlloc ),
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ),
sizeof( QueueHeader ) + sizeof( QueueCallstackFrame ), // symbol information
sizeof( QueueHeader ) + sizeof( QueueSymbolInformation ),
sizeof( QueueHeader ) + sizeof( QueueFrameImage ),
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ),
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // callstack

View File

@ -3559,7 +3559,7 @@ bool Worker::Process( const QueueItem& ev )
ProcessCallstackFrame( ev.callstackFrame );
break;
case QueueType::SymbolInformation:
ProcessSymbolInformation( ev.callstackFrame );
ProcessSymbolInformation( ev.symbolInformation );
break;
case QueueType::Terminate:
m_terminate = true;
@ -4846,13 +4846,11 @@ void Worker::ProcessCallstackFrame( const QueueCallstackFrame& ev )
m_pendingCustomStrings.erase( m_pendingCustomStrings.find( ev.file ) );
}
void Worker::ProcessSymbolInformation( const QueueCallstackFrame& ev )
void Worker::ProcessSymbolInformation( const QueueSymbolInformation& ev )
{
auto it = m_pendingSymbols.find( ev.symAddr );
assert( it != m_pendingSymbols.end() );
auto nit = m_pendingCustomStrings.find( ev.name );
assert( nit != m_pendingCustomStrings.end() );
auto fit = m_pendingCustomStrings.find( ev.file );
assert( fit != m_pendingCustomStrings.end() );
@ -4864,8 +4862,7 @@ void Worker::ProcessSymbolInformation( const QueueCallstackFrame& ev )
m_data.symbolMap.emplace( ev.symAddr, std::move( sd ) );
m_pendingSymbols.erase( it );
m_pendingCustomStrings.erase( nit );
m_pendingCustomStrings.erase( m_pendingCustomStrings.find( ev.file ) );
m_pendingCustomStrings.erase( fit );
}
void Worker::ProcessCrashReport( const QueueCrashReport& ev )

View File

@ -533,7 +533,7 @@ private:
tracy_force_inline void ProcessCallstackSample( const QueueCallstackSample& ev );
tracy_force_inline void ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev );
tracy_force_inline void ProcessCallstackFrame( const QueueCallstackFrame& ev );
tracy_force_inline void ProcessSymbolInformation( const QueueCallstackFrame& ev );
tracy_force_inline void ProcessSymbolInformation( const QueueSymbolInformation& ev );
tracy_force_inline void ProcessCrashReport( const QueueCrashReport& ev );
tracy_force_inline void ProcessSysTime( const QueueSysTime& ev );
tracy_force_inline void ProcessContextSwitch( const QueueContextSwitch& ev );