Skip to content

Commit

Permalink
[lldb] Include memory stats in statistics summary (#94671)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bulbazord authored Jun 6, 2024
1 parent f543dfd commit 9293fc7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lldb/source/Target/Statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 9293fc7

Please sign in to comment.