[Lldb-commits] [lldb] Fix dap stacktrace perf issue (PR #104874)

via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 21 15:16:56 PDT 2024


================
@@ -3091,17 +3093,20 @@ void request_stackTrace(const llvm::json::Object &request) {
     // This will always return an invalid thread when
     // libBacktraceRecording.dylib is not loaded or if there is no extended
     // backtrace.
-    lldb::SBThread queue_backtrace_thread =
-        thread.GetExtendedBacktraceThread("libdispatch");
+    lldb::SBThread queue_backtrace_thread;
+    if (g_dap.enable_display_extended_backtrace)
+      queue_backtrace_thread = thread.GetExtendedBacktraceThread("libdispatch");
----------------
jeffreytan81 wrote:

@ashgti, if you look at the profile trace, the hot path does not come from this call (`thread.GetExtendedBacktraceThread()`) but from `thread.GetCurrentExceptionBacktrace()` below. 

https://github.com/llvm/llvm-project/pull/104874


More information about the lldb-commits mailing list