mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Send single string for symbol information.
This commit is contained in:
parent
14b180cd16
commit
06ca4e2d16
@ -2873,11 +2873,10 @@ void Profiler::HandleSymbolQuery( uint64_t symbol )
|
|||||||
#ifdef TRACY_HAS_CALLSTACK
|
#ifdef TRACY_HAS_CALLSTACK
|
||||||
const auto sym = DecodeSymbolAddress( symbol );
|
const auto sym = DecodeSymbolAddress( symbol );
|
||||||
|
|
||||||
SendString( uint64_t( sym.file ), sym.file, QueueType::CustomStringData );
|
SendSingleString( sym.file );
|
||||||
|
|
||||||
QueueItem item;
|
QueueItem item;
|
||||||
MemWrite( &item.hdr.type, QueueType::SymbolInformation );
|
MemWrite( &item.hdr.type, QueueType::SymbolInformation );
|
||||||
MemWrite( &item.symbolInformation.file, uint64_t( sym.file ) );
|
|
||||||
MemWrite( &item.symbolInformation.line, sym.line );
|
MemWrite( &item.symbolInformation.line, sym.line );
|
||||||
MemWrite( &item.symbolInformation.symAddr, symbol );
|
MemWrite( &item.symbolInformation.symAddr, symbol );
|
||||||
|
|
||||||
|
|||||||
@ -393,7 +393,6 @@ struct QueueCallstackFrame
|
|||||||
|
|
||||||
struct QueueSymbolInformation
|
struct QueueSymbolInformation
|
||||||
{
|
{
|
||||||
uint64_t file;
|
|
||||||
uint32_t line;
|
uint32_t line;
|
||||||
uint64_t symAddr;
|
uint64_t symAddr;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -5503,12 +5503,13 @@ void Worker::ProcessSymbolInformation( const QueueSymbolInformation& ev )
|
|||||||
auto it = m_pendingSymbols.find( ev.symAddr );
|
auto it = m_pendingSymbols.find( ev.symAddr );
|
||||||
assert( it != m_pendingSymbols.end() );
|
assert( it != m_pendingSymbols.end() );
|
||||||
|
|
||||||
auto fit = m_pendingCustomStrings.find( ev.file );
|
assert( m_pendingSingleString.ptr != nullptr );
|
||||||
assert( fit != m_pendingCustomStrings.end() );
|
const auto idx = m_pendingSingleString.idx;
|
||||||
|
m_pendingSingleString.ptr = nullptr;
|
||||||
|
|
||||||
SymbolData sd;
|
SymbolData sd;
|
||||||
sd.name = it->second.name;
|
sd.name = it->second.name;
|
||||||
sd.file = StringIdx( fit->second.idx );
|
sd.file = StringIdx( idx );
|
||||||
sd.line = ev.line;
|
sd.line = ev.line;
|
||||||
sd.imageName = it->second.imageName;
|
sd.imageName = it->second.imageName;
|
||||||
sd.callFile = it->second.file;
|
sd.callFile = it->second.file;
|
||||||
@ -5535,12 +5536,11 @@ void Worker::ProcessSymbolInformation( const QueueSymbolInformation& ev )
|
|||||||
m_data.symbolLocInline.push_back( ev.symAddr );
|
m_data.symbolLocInline.push_back( ev.symAddr );
|
||||||
}
|
}
|
||||||
|
|
||||||
StringRef ref( StringRef::Idx, fit->second.idx );
|
StringRef ref( StringRef::Idx, idx );
|
||||||
auto cit = m_checkedFileStrings.find( ref );
|
auto cit = m_checkedFileStrings.find( ref );
|
||||||
if( cit == m_checkedFileStrings.end() ) CacheSource( ref );
|
if( cit == m_checkedFileStrings.end() ) CacheSource( ref );
|
||||||
|
|
||||||
m_pendingSymbols.erase( it );
|
m_pendingSymbols.erase( it );
|
||||||
m_pendingCustomStrings.erase( fit );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ProcessCodeInformation( const QueueCodeInformation& ev )
|
void Worker::ProcessCodeInformation( const QueueCodeInformation& ev )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user