From c2c1c4e2b776da372de976657fe1d5fafdbf18a9 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 25 Jul 2026 22:22:49 +0200 Subject: [PATCH] Ignore the statistics range filter in the disassembly LLM tool. The symbol disassembly tool scoped its cost data to the statistics range filter. This is invisible UI state which the model cannot see, so range-limited numbers were indistinguishable from whole-trace figures and could silently change between tool calls. The other sampling tools always report whole-trace data; do the same here. --- profiler/src/profiler/TracyDisassembly.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/profiler/src/profiler/TracyDisassembly.cpp b/profiler/src/profiler/TracyDisassembly.cpp index aba7d3ce..a41f8712 100644 --- a/profiler/src/profiler/TracyDisassembly.cpp +++ b/profiler/src/profiler/TracyDisassembly.cpp @@ -717,20 +717,21 @@ nlohmann::json JsonDisassembly( uint64_t symAddr, Worker& worker, const View& vi auto data = Disassemble( symAddr, worker ); if( data.lines.empty() ) return nlohmann::json { { "error", "Disassembly failed" } }; - const bool limitView = view.GetRange( RangeId::Statistics ).active; + // Tool calls always operate on the whole trace. The statistics range filter is + // invisible UI state, which would silently scope the reported costs. AddrStatData as; - GatherIpStats( symAddr, as, worker, limitView, view, nullptr, false ); + GatherIpStats( symAddr, as, worker, false, view, nullptr, false ); auto iptr = worker.GetInlineSymbolList( symAddr, data.codeLen ); if( iptr ) { const auto symEnd = symAddr + data.codeLen; while( *iptr < symEnd ) { - GatherIpStats( *iptr, as, worker, limitView, view, nullptr, false ); + GatherIpStats( *iptr, as, worker, false, view, nullptr, false ); iptr++; } } - GatherAdditionalIpStats( symAddr, as, worker, limitView, view, nullptr, false ); + GatherAdditionalIpStats( symAddr, as, worker, false, view, nullptr, false ); char tmp[32]; sprintf( tmp, "0x%" PRIx64, symAddr );