From ed8fc7690f5e48e807fc5766c9ea3eaf131dccaf Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 11 Jan 2026 20:54:10 +0100 Subject: [PATCH] Implement automatic callstack annotation. --- profiler/src/profiler/TracyView_Callstack.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyView_Callstack.cpp b/profiler/src/profiler/TracyView_Callstack.cpp index 0c69a860..0765e49b 100644 --- a/profiler/src/profiler/TracyView_Callstack.cpp +++ b/profiler/src/profiler/TracyView_Callstack.cpp @@ -168,11 +168,18 @@ void View::DrawCallstackTable( uint32_t callstack, bool globalEntriesButton ) #ifndef __EMSCRIPTEN__ if( s_config.llm ) { + bool force = false; + if( s_config.llmAnnotateCallstacks ) + { + std::lock_guard lock( m_callstackDescLock ); + auto it = m_callstackDesc.find( callstack ); + if( it == m_callstackDesc.end() ) force = true; + } ImGui::SameLine(); ImGui::SeparatorEx( ImGuiSeparatorFlags_Vertical ); ImGui::SameLine(); bool clicked = false; - if( ImGui::SmallButton( ICON_FA_TAG ) ) + if( ImGui::SmallButton( ICON_FA_TAG ) || force ) { clicked = true; nlohmann::json req = {