diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-10-11 23:56:23 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-10-11 23:56:23 +0300 |
commit | 383ecb6a121b1844c042a893c215669d39a60365 (patch) | |
tree | c2ef9b96bc669459f0b192cda933f690d443b105 /server | |
parent | ac6902501addf1067f14e22358102805b09a2a25 (diff) |
Remove CodeLocation query and CodeInformation response.
Diffstat (limited to 'server')
-rw-r--r-- | server/TracyEventDebug.cpp | 3 | ||||
-rw-r--r-- | server/TracyWorker.cpp | 69 | ||||
-rw-r--r-- | server/TracyWorker.hpp | 2 |
3 files changed, 1 insertions, 73 deletions
diff --git a/server/TracyEventDebug.cpp b/server/TracyEventDebug.cpp index 74e6842c..c6c02ffa 100644 --- a/server/TracyEventDebug.cpp +++ b/server/TracyEventDebug.cpp @@ -171,9 +171,6 @@ void EventDebug( const QueueItem& ev ) case QueueType::SymbolInformation: fprintf( f, "ev %i (SymbolInformation)\n", ev.hdr.idx ); break; - case QueueType::CodeInformation: - fprintf( f, "ev %i (CodeInformation)\n", ev.hdr.idx ); - break; case QueueType::FiberEnter: fprintf( f, "ev %i (FiberEnter)\n", ev.hdr.idx ); fprintf( f, "\ttime = %" PRIi64 "\n", ev.fiberEnter.time ); diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index ea07cef7..ab94b3d5 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -277,7 +277,6 @@ Worker::Worker( const char* addr, uint16_t port ) , m_pendingSourceLocation( 0 ) , m_pendingCallstackFrames( 0 ) , m_pendingCallstackSubframes( 0 ) - , m_pendingCodeInformation( 0 ) , m_pendingSymbolCode( 0 ) , m_callstackFrameStaging( nullptr ) , m_traceVersion( CurrentVersion ) @@ -3201,7 +3200,7 @@ void Worker::Exec() if( m_pendingStrings != 0 || m_pendingThreads != 0 || m_pendingSourceLocation != 0 || m_pendingCallstackFrames != 0 || m_data.plots.IsPending() || m_pendingCallstackId != 0 || m_pendingExternalNames != 0 || m_pendingCallstackSubframes != 0 || m_pendingFrameImageData.image != nullptr || !m_pendingSymbols.empty() || - m_pendingSymbolCode != 0 || m_pendingCodeInformation != 0 || !m_serverQueryQueue.empty() || !m_serverQueryQueuePrio.empty() || + m_pendingSymbolCode != 0 || !m_serverQueryQueue.empty() || !m_serverQueryQueuePrio.empty() || m_pendingSourceLocationPayload != 0 || m_pendingSingleString.ptr != nullptr || m_pendingSecondString.ptr != nullptr || !m_sourceCodeQuery.empty() || m_pendingFibers != 0 ) { @@ -3426,7 +3425,6 @@ void Worker::DispatchFailure( const QueueItem& ev, const char*& ptr ) ProcessCallstackFrame( ev.callstackFrame, false ); break; case QueueType::SymbolInformation: - case QueueType::CodeInformation: case QueueType::AckServerQueryNoop: case QueueType::AckSourceCodeNotAvailable: case QueueType::AckSymbolCodeNotAvailable: @@ -4915,10 +4913,6 @@ bool Worker::Process( const QueueItem& ev ) ProcessSymbolInformation( ev.symbolInformation ); m_serverQuerySpaceLeft++; break; - case QueueType::CodeInformation: - ProcessCodeInformation( ev.codeInformation ); - m_serverQuerySpaceLeft++; - break; case QueueType::Terminate: m_terminate = true; break; @@ -6823,67 +6817,6 @@ void Worker::ProcessSymbolInformation( const QueueSymbolInformation& ev ) m_pendingSymbols.erase( it ); } -void Worker::ProcessCodeInformation( const QueueCodeInformation& ev ) -{ - assert( m_pendingCodeInformation > 0 ); - m_pendingCodeInformation--; - - const auto idx = GetSingleStringIdx(); - const uint64_t ptr = ev.symAddr + ev.ptrOffset; - - if( ev.line != 0 ) - { - assert( m_data.codeAddressToLocation.find( ptr ) == m_data.codeAddressToLocation.end() ); - const auto packed = PackFileLine( idx, ev.line ); - m_data.codeAddressToLocation.emplace( ptr, packed ); - - auto lit = m_data.locationCodeAddressList.find( packed ); - if( lit == m_data.locationCodeAddressList.end() ) - { - m_data.locationCodeAddressList.emplace( packed, Vector<uint64_t>( ptr ) ); - } - else - { - const bool needSort = lit->second.back() > ptr; - lit->second.push_back( ptr ); - if( needSort ) pdqsort_branchless( lit->second.begin(), lit->second.end() ); - } - - StringRef ref( StringRef::Idx, idx ); - auto cit = m_checkedFileStrings.find( ref ); - if( cit == m_checkedFileStrings.end() ) - { - uint64_t baseAddr = 0; - if( HasSymbolCode( ev.symAddr ) ) - { - baseAddr = ev.symAddr; - } - else - { - const auto parentAddr = GetSymbolForAddress( ev.symAddr ); - if( parentAddr != 0 && HasSymbolCode( parentAddr ) ) - { - baseAddr = parentAddr; - } - } - const SymbolData* sym = baseAddr == 0 ? nullptr : GetSymbolData( baseAddr ); - if( !sym ) - { - CacheSource( ref ); - } - else - { - CacheSource( ref, sym->imageName ); - } - } - } - if( ev.symAddr != 0 ) - { - assert( m_data.codeSymbolMap.find( ptr ) == m_data.codeSymbolMap.end() ); - m_data.codeSymbolMap.emplace( ptr, ev.symAddr ); - } -} - void Worker::ProcessCrashReport( const QueueCrashReport& ev ) { CheckString( ev.text ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index e432f407..3f9f524d 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -737,7 +737,6 @@ private: tracy_force_inline void ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev ); tracy_force_inline void ProcessCallstackFrame( const QueueCallstackFrame& ev, bool querySymbols ); tracy_force_inline void ProcessSymbolInformation( const QueueSymbolInformation& ev ); - tracy_force_inline void ProcessCodeInformation( const QueueCodeInformation& 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 ); @@ -1000,7 +999,6 @@ private: uint32_t m_pendingSourceLocation; uint32_t m_pendingCallstackFrames; uint8_t m_pendingCallstackSubframes; - uint32_t m_pendingCodeInformation; uint32_t m_pendingSymbolCode; CallstackFrameData* m_callstackFrameStaging; |