23 "Enable statistics collection", nullptr,
24 eCommandProcessMustBePaused) {}
30 if (DebuggerStats::GetCollectingStats()) {
35 DebuggerStats::SetCollectingStats(
true);
45 "Disable statistics collection", nullptr,
46 eCommandProcessMustBePaused) {}
52 if (!DebuggerStats::GetCollectingStats()) {
53 result.
AppendError(
"need to enable statistics before disabling them");
57 DebuggerStats::SetCollectingStats(
false);
63 #define LLDB_OPTIONS_statistics_dump
64 #include "CommandOptions.inc"
74 const int short_option = m_getopt_table[option_idx].val;
76 switch (short_option) {
81 llvm_unreachable(
"Unimplemented option");
87 m_all_targets =
false;
91 return llvm::makeArrayRef(g_statistics_dump_options);
94 bool m_all_targets =
false;
100 interpreter,
"statistics dump",
"Dump metrics in JSON format",
101 "statistics dump [<options>]", eCommandRequiresTarget) {}
110 if (!m_options.m_all_targets)
111 target = m_exe_ctx.GetTargetPtr();
114 "{0:2}", DebuggerStats::ReportStatistics(GetDebugger(), target));
124 "Print statistics about a debugging session",
125 "statistics <subcommand> [<subcommand-options>]") {