mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Pass symbol image name to CacheSource().
This commit is contained in:
parent
33a6853423
commit
fd55c1e975
@ -3371,7 +3371,7 @@ void Worker::QueryTerminate()
|
||||
m_sock.Send( &query, ServerQueryPacketSize );
|
||||
}
|
||||
|
||||
void Worker::QuerySourceFile( const char* fn )
|
||||
void Worker::QuerySourceFile( const char* fn, const char* image )
|
||||
{
|
||||
QueryDataTransfer( fn, strlen( fn ) + 1 );
|
||||
Query( ServerQuerySourceCode, 0 );
|
||||
@ -6597,7 +6597,7 @@ void Worker::ProcessCallstackFrame( const QueueCallstackFrame& ev, bool querySym
|
||||
|
||||
StringRef ref( StringRef::Idx, fitidx );
|
||||
auto cit = m_checkedFileStrings.find( ref );
|
||||
if( cit == m_checkedFileStrings.end() ) CacheSource( ref );
|
||||
if( cit == m_checkedFileStrings.end() ) CacheSource( ref, m_callstackFrameStaging->imageName );
|
||||
|
||||
const auto frameId = PackPointer( m_callstackFrameStagingPtr );
|
||||
#ifndef TRACY_NO_STATISTICS
|
||||
@ -6700,7 +6700,7 @@ void Worker::ProcessSymbolInformation( const QueueSymbolInformation& ev )
|
||||
|
||||
StringRef ref( StringRef::Idx, idx );
|
||||
auto cit = m_checkedFileStrings.find( ref );
|
||||
if( cit == m_checkedFileStrings.end() ) CacheSource( ref );
|
||||
if( cit == m_checkedFileStrings.end() ) CacheSource( ref, it->second.imageName );
|
||||
|
||||
m_pendingSymbols.erase( it );
|
||||
}
|
||||
@ -6733,7 +6733,19 @@ void Worker::ProcessCodeInformation( const QueueCodeInformation& ev )
|
||||
|
||||
StringRef ref( StringRef::Idx, idx );
|
||||
auto cit = m_checkedFileStrings.find( ref );
|
||||
if( cit == m_checkedFileStrings.end() ) CacheSource( ref );
|
||||
if( cit == m_checkedFileStrings.end() )
|
||||
{
|
||||
auto& symmap = GetSymbolMap();
|
||||
auto it = symmap.find( ev.symAddr );
|
||||
if( it == symmap.end() )
|
||||
{
|
||||
CacheSource( ref );
|
||||
}
|
||||
else
|
||||
{
|
||||
CacheSource( ref, it->second.imageName );
|
||||
}
|
||||
}
|
||||
}
|
||||
if( ev.symAddr != 0 )
|
||||
{
|
||||
@ -8514,7 +8526,7 @@ ZoneExtra& Worker::RequestZoneExtra( ZoneEvent& ev )
|
||||
}
|
||||
}
|
||||
|
||||
void Worker::CacheSource( const StringRef& str )
|
||||
void Worker::CacheSource( const StringRef& str, const StringIdx& image )
|
||||
{
|
||||
assert( str.active );
|
||||
assert( m_checkedFileStrings.find( str ) == m_checkedFileStrings.end() );
|
||||
@ -8530,7 +8542,7 @@ void Worker::CacheSource( const StringRef& str )
|
||||
else if( execTime != 0 )
|
||||
{
|
||||
m_sourceCodeQuery.emplace_back( file );
|
||||
QuerySourceFile( file );
|
||||
QuerySourceFile( file, image.Active() ? GetString( image ) : nullptr );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -667,7 +667,7 @@ private:
|
||||
void Exec();
|
||||
void Query( ServerQuery type, uint64_t data, uint32_t extra = 0 );
|
||||
void QueryTerminate();
|
||||
void QuerySourceFile( const char* fn );
|
||||
void QuerySourceFile( const char* fn, const char* image );
|
||||
void QueryDataTransfer( const void* ptr, size_t size );
|
||||
|
||||
tracy_force_inline bool DispatchProcess( const QueueItem& ev, const char*& ptr );
|
||||
@ -886,7 +886,7 @@ private:
|
||||
StringLocation StoreString( const char* str, size_t sz );
|
||||
const ContextSwitch* const GetContextSwitchDataImpl( uint64_t thread );
|
||||
|
||||
void CacheSource( const StringRef& str );
|
||||
void CacheSource( const StringRef& str, const StringIdx& image = StringIdx() );
|
||||
void CacheSourceFromFile( const char* fn );
|
||||
|
||||
tracy_force_inline Vector<short_ptr<ZoneEvent>>& GetZoneChildrenMutable( int32_t idx ) { return m_data.zoneChildren[idx]; }
|
||||
|
Loading…
Reference in New Issue
Block a user