mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
No need to remember addresses of symbol code queries.
This commit is contained in:
parent
b4da047355
commit
abdd6020ba
@ -272,6 +272,7 @@ Worker::Worker( const char* addr, uint16_t port )
|
|||||||
, m_pendingCallstackFrames( 0 )
|
, m_pendingCallstackFrames( 0 )
|
||||||
, m_pendingCallstackSubframes( 0 )
|
, m_pendingCallstackSubframes( 0 )
|
||||||
, m_pendingCodeInformation( 0 )
|
, m_pendingCodeInformation( 0 )
|
||||||
|
, m_pendingSymbolCode( 0 )
|
||||||
, m_callstackFrameStaging( nullptr )
|
, m_callstackFrameStaging( nullptr )
|
||||||
, m_traceVersion( CurrentVersion )
|
, m_traceVersion( CurrentVersion )
|
||||||
, m_loadTime( 0 )
|
, m_loadTime( 0 )
|
||||||
@ -3159,7 +3160,7 @@ void Worker::Exec()
|
|||||||
if( m_pendingStrings != 0 || m_pendingThreads != 0 || m_pendingSourceLocation != 0 || m_pendingCallstackFrames != 0 ||
|
if( m_pendingStrings != 0 || m_pendingThreads != 0 || m_pendingSourceLocation != 0 || m_pendingCallstackFrames != 0 ||
|
||||||
m_data.plots.IsPending() || m_pendingCallstackId != 0 || m_pendingExternalNames != 0 ||
|
m_data.plots.IsPending() || m_pendingCallstackId != 0 || m_pendingExternalNames != 0 ||
|
||||||
m_pendingCallstackSubframes != 0 || m_pendingFrameImageData.image != nullptr || !m_pendingSymbols.empty() ||
|
m_pendingCallstackSubframes != 0 || m_pendingFrameImageData.image != nullptr || !m_pendingSymbols.empty() ||
|
||||||
!m_pendingSymbolCode.empty() || m_pendingCodeInformation != 0 || !m_serverQueryQueue.empty() ||
|
m_pendingSymbolCode != 0 || m_pendingCodeInformation != 0 || !m_serverQueryQueue.empty() ||
|
||||||
m_pendingSourceLocationPayload != 0 || m_pendingSingleString.ptr != nullptr || m_pendingSecondString.ptr != nullptr ||
|
m_pendingSourceLocationPayload != 0 || m_pendingSingleString.ptr != nullptr || m_pendingSecondString.ptr != nullptr ||
|
||||||
!m_sourceCodeQuery.empty() || m_pendingFibers != 0 )
|
!m_sourceCodeQuery.empty() || m_pendingFibers != 0 )
|
||||||
{
|
{
|
||||||
@ -4046,9 +4047,8 @@ void Worker::AddFrameImageData( uint64_t ptr, const char* data, size_t sz )
|
|||||||
|
|
||||||
void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
|
void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
|
||||||
{
|
{
|
||||||
auto it = m_pendingSymbolCode.find( ptr );
|
assert( m_pendingSymbolCode > 0 );
|
||||||
assert( it != m_pendingSymbolCode.end() );
|
m_pendingSymbolCode--;
|
||||||
m_pendingSymbolCode.erase( it );
|
|
||||||
|
|
||||||
auto code = (char*)m_slab.AllocBig( sz );
|
auto code = (char*)m_slab.AllocBig( sz );
|
||||||
memcpy( code, data, sz );
|
memcpy( code, data, sz );
|
||||||
@ -6608,8 +6608,7 @@ void Worker::ProcessSymbolInformation( const QueueSymbolInformation& ev )
|
|||||||
|
|
||||||
if( m_codeTransfer && it->second.size > 0 && it->second.size <= 128*1024 )
|
if( m_codeTransfer && it->second.size > 0 && it->second.size <= 128*1024 )
|
||||||
{
|
{
|
||||||
assert( m_pendingSymbolCode.find( ev.symAddr ) == m_pendingSymbolCode.end() );
|
m_pendingSymbolCode++;
|
||||||
m_pendingSymbolCode.emplace( ev.symAddr );
|
|
||||||
Query( ServerQuerySymbolCode, ev.symAddr, it->second.size );
|
Query( ServerQuerySymbolCode, ev.symAddr, it->second.size );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -927,7 +927,6 @@ private:
|
|||||||
unordered_flat_map<uint64_t, ThreadData*> m_threadMap;
|
unordered_flat_map<uint64_t, ThreadData*> m_threadMap;
|
||||||
FrameImagePending m_pendingFrameImageData = {};
|
FrameImagePending m_pendingFrameImageData = {};
|
||||||
unordered_flat_map<uint64_t, SymbolPending> m_pendingSymbols;
|
unordered_flat_map<uint64_t, SymbolPending> m_pendingSymbols;
|
||||||
unordered_flat_set<uint64_t> m_pendingSymbolCode;
|
|
||||||
unordered_flat_set<StringRef, StringRefHasher, StringRefComparator> m_pendingFileStrings;
|
unordered_flat_set<StringRef, StringRefHasher, StringRefComparator> m_pendingFileStrings;
|
||||||
unordered_flat_set<StringRef, StringRefHasher, StringRefComparator> m_checkedFileStrings;
|
unordered_flat_set<StringRef, StringRefHasher, StringRefComparator> m_checkedFileStrings;
|
||||||
StringLocation m_pendingSingleString = {};
|
StringLocation m_pendingSingleString = {};
|
||||||
@ -941,6 +940,7 @@ private:
|
|||||||
uint32_t m_pendingCallstackFrames;
|
uint32_t m_pendingCallstackFrames;
|
||||||
uint8_t m_pendingCallstackSubframes;
|
uint8_t m_pendingCallstackSubframes;
|
||||||
uint32_t m_pendingCodeInformation;
|
uint32_t m_pendingCodeInformation;
|
||||||
|
uint32_t m_pendingSymbolCode;
|
||||||
|
|
||||||
CallstackFrameData* m_callstackFrameStaging;
|
CallstackFrameData* m_callstackFrameStaging;
|
||||||
uint64_t m_callstackFrameStagingPtr;
|
uint64_t m_callstackFrameStagingPtr;
|
||||||
|
Loading…
Reference in New Issue
Block a user