1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-30 04:43:53 +00:00

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 )
{ {
@ -3659,6 +3665,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
@ -3671,6 +3683,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();