From 24feaab8380c69d5fa3eb8c21ef2d660913fd4a9 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Sun, 17 Nov 2024 20:36:54 -0800 Subject: Fix statistics dump to report per-target (#113723) "statistics dump" currently report the statistics of all targets in debugger instead of current target. This is wrong because there is a "statistics dump --all-targets" option that supposed to include everything. This PR fixes the issue by only report statistics for current target instead of all. It also includes the change to reset statistics debug info/symbol table parsing/indexing time during debugger destroy. This is required so that we report current statistics if we plan to reuse lldb/lldb-dap across debug sessions --------- Co-authored-by: jeffreytan81 --- lldb/source/Target/Target.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/source/Target/Target.cpp') diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 300dca163c41..d70274a4b7c7 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -5149,3 +5149,5 @@ llvm::json::Value Target::ReportStatistics(const lldb_private::StatisticsOptions &options) { return m_stats.ToJSON(*this, options); } + +void Target::ResetStatistics() { m_stats.Reset(*this); } -- cgit v1.2.3