From 7268cd8c32212e6748b05d10dbdd315b6bb272e3 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 10 Jan 2026 00:32:40 +0100 Subject: [PATCH] Include external jump destination names in LLM attachment. --- profiler/src/profiler/TracySourceView.cpp | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/profiler/src/profiler/TracySourceView.cpp b/profiler/src/profiler/TracySourceView.cpp index 7d1060e4..404bf5f4 100644 --- a/profiler/src/profiler/TracySourceView.cpp +++ b/profiler/src/profiler/TracySourceView.cpp @@ -2463,6 +2463,30 @@ void SourceView::AttachRangeToLlm( size_t start, size_t stop, Worker& worker, Vi line["asm"] = v.mnemonic + " .L" + std::to_string( lit->second ); hasJump = true; } + else + { + const char* jumpName = nullptr; + uint32_t jumpOffset; + uint64_t jumpBase = worker.GetSymbolForAddress( v.jumpAddr, jumpOffset ); + if( jumpBase && jumpBase != m_baseAddr ) + { + auto jumpSym = worker.GetSymbolData( jumpBase ); + if( jumpSym ) + { + if( worker.HasInlineSymbolAddresses() ) + { + const auto symAddr = worker.GetInlineSymbolForAddress( v.jumpAddr ); + if( symAddr != 0 ) + { + const auto symData = worker.GetSymbolData( symAddr ); + if( symData ) jumpName = worker.GetString( symData->name ); + } + } + if( !jumpName ) jumpName = worker.GetString( jumpSym->name ); + } + } + if( jumpName ) line["destination"] = jumpName; + } } if( !hasJump ) {