From b35dfe71d1c802352ce1c682b4f912067104aa2e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 12 Jun 2021 16:08:50 +0200 Subject: [PATCH] Send kernel symbol information. --- client/TracyProfiler.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 056146ef..72a3454b 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -3218,6 +3218,17 @@ static bool EnsureReadable( uintptr_t address ) void Profiler::HandleSymbolQuery( uint64_t symbol ) { #ifdef TRACY_HAS_CALLSTACK + // Special handling for kernel frames + if( symbol >> 63 != 0 ) + { + SendSingleString( "" ); + QueueItem item; + MemWrite( &item.hdr.type, QueueType::SymbolInformation ); + MemWrite( &item.symbolInformation.line, 0 ); + MemWrite( &item.symbolInformation.symAddr, symbol ); + AppendData( &item, QueueDataSize[(int)QueueType::SymbolInformation] ); + return; + } # ifdef __ANDROID__ // On Android it's common for code to be in mappings that are only executable // but not readable.