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

View File

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