Dispatch kernel code retrieval.

This commit is contained in:
Bartosz Taudul 2021-11-25 22:27:35 +01:00
parent 47ea2a222d
commit e8fb2abb2a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 21 additions and 7 deletions

View File

@ -3100,6 +3100,12 @@ void Profiler::QueueExternalName( uint64_t ptr )
#endif #endif
} }
void Profiler::QueueKernelCode( uint64_t symbol, uint32_t size )
{
assert( symbol >> 63 != 0 );
AckServerQuery();
}
#ifdef TRACY_HAS_CALLSTACK #ifdef TRACY_HAS_CALLSTACK
void Profiler::HandleSymbolQueueItem( const SymbolQueueItem& si ) void Profiler::HandleSymbolQueueItem( const SymbolQueueItem& si )
{ {
@ -3660,6 +3666,12 @@ void Profiler::HandleParameter( uint64_t payload )
void Profiler::HandleSymbolCodeQuery( uint64_t symbol, uint32_t size ) void Profiler::HandleSymbolCodeQuery( uint64_t symbol, uint32_t size )
{ {
if( symbol >> 63 != 0 )
{
QueueKernelCode( symbol, size );
}
else
{
#ifdef __ANDROID__ #ifdef __ANDROID__
// On Android it's common for code to be in mappings that are only executable // On Android it's common for code to be in mappings that are only executable
// but not readable. // but not readable.
@ -3670,6 +3682,7 @@ void Profiler::HandleSymbolCodeQuery( uint64_t symbol, uint32_t size )
} }
#endif #endif
SendLongString( symbol, (const char*)symbol, size, QueueType::SymbolCode ); SendLongString( symbol, (const char*)symbol, size, QueueType::SymbolCode );
}
} }
void Profiler::HandleSourceCodeQuery() void Profiler::HandleSourceCodeQuery()

View File

@ -753,6 +753,7 @@ private:
void QueueSymbolQuery( uint64_t symbol ); void QueueSymbolQuery( uint64_t symbol );
void QueueCodeLocation( uint64_t ptr ); void QueueCodeLocation( uint64_t ptr );
void QueueExternalName( uint64_t ptr ); void QueueExternalName( uint64_t ptr );
void QueueKernelCode( uint64_t symbol, uint32_t size );
bool HandleServerQuery(); bool HandleServerQuery();
void HandleDisconnect(); void HandleDisconnect();