Skip to content

Commit 9293fc7

Browse files
authored
[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.
1 parent f543dfd commit 9293fc7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lldb/source/Target/Statistics.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,14 +355,14 @@ llvm::json::Value DebuggerStats::ReportStatistics(
355355
}
356356
global_stats.try_emplace("targets", std::move(json_targets));
357357

358+
ConstStringStats const_string_stats;
359+
json::Object json_memory{
360+
{"strings", const_string_stats.ToJSON()},
361+
};
362+
global_stats.try_emplace("memory", std::move(json_memory));
358363
if (!summary_only) {
359-
ConstStringStats const_string_stats;
360-
json::Object json_memory{
361-
{"strings", const_string_stats.ToJSON()},
362-
};
363364
json::Value cmd_stats = debugger.GetCommandInterpreter().GetStatistics();
364365
global_stats.try_emplace("modules", std::move(json_modules));
365-
global_stats.try_emplace("memory", std::move(json_memory));
366366
global_stats.try_emplace("commands", std::move(cmd_stats));
367367
}
368368

0 commit comments

Comments
 (0)