aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Langford <alangford@apple.com>2024-06-06 13:18:06 -0700
committerGitHub <noreply@github.com>2024-06-06 13:18:06 -0700
commit9293fc7981526eaca0a28012f2e5963fff1b830b (patch)
tree06b7401f91019720c08fa0b5a75ef3eb7fc1509c
parentf543dfd1d70d2e5d9a746dd77450304c47cd7c15 (diff)
downloadllvm-9293fc7981526eaca0a28012f2e5963fff1b830b.zip
llvm-9293fc7981526eaca0a28012f2e5963fff1b830b.tar.gz
llvm-9293fc7981526eaca0a28012f2e5963fff1b830b.tar.bz2
[lldb] Include memory stats in statistics summary (#94671)
The summary already includes other size information, e.g. total debug info size in bytes. The only other way I can get this information is by dumping all statistics which can be quite large. Adding it to the summary seems fair.
-rw-r--r--lldb/source/Target/Statistics.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Target/Statistics.cpp b/lldb/source/Target/Statistics.cpp
index be08485..2a53000 100644
--- a/lldb/source/Target/Statistics.cpp
+++ b/lldb/source/Target/Statistics.cpp
@@ -355,14 +355,14 @@ llvm::json::Value DebuggerStats::ReportStatistics(
}
global_stats.try_emplace("targets", std::move(json_targets));
+ ConstStringStats const_string_stats;
+ json::Object json_memory{
+ {"strings", const_string_stats.ToJSON()},
+ };
+ global_stats.try_emplace("memory", std::move(json_memory));
if (!summary_only) {
- ConstStringStats const_string_stats;
- json::Object json_memory{
- {"strings", const_string_stats.ToJSON()},
- };
json::Value cmd_stats = debugger.GetCommandInterpreter().GetStatistics();
global_stats.try_emplace("modules", std::move(json_modules));
- global_stats.try_emplace("memory", std::move(json_memory));
global_stats.try_emplace("commands", std::move(cmd_stats));
}