summaryrefslogtreecommitdiff
path: root/lldb/source/Target/Target.cpp
diff options
context:
space:
mode:
authorjeffreytan81 <jeffreytan@meta.com>2024-11-17 20:36:54 -0800
committerGitHub <noreply@github.com>2024-11-17 20:36:54 -0800
commit24feaab8380c69d5fa3eb8c21ef2d660913fd4a9 (patch)
treefc9cb232cb4670c14418dc2beb4131b42fb2ec0f /lldb/source/Target/Target.cpp
parentd9eda6b2f3843cf63fa36e7d5d670ca225cbcbd7 (diff)
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 <jeffreytan@fb.com>
Diffstat (limited to 'lldb/source/Target/Target.cpp')
-rw-r--r--lldb/source/Target/Target.cpp2
1 files changed, 2 insertions, 0 deletions
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); }