[Lldb-commits] [lldb] Revert "Support statistics dump summary only mode" (PR #80915)

via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 6 17:07:04 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 44767278650227b30cf969170dc139197ce4338d 0542e00e3a5753fe7e724b2d0e75224f8aa4df1f -- lldb/include/lldb/API/LLDB.h lldb/include/lldb/API/SBDefines.h lldb/include/lldb/API/SBTarget.h lldb/include/lldb/Target/Statistics.h lldb/include/lldb/Target/Target.h lldb/include/lldb/lldb-forward.h lldb/source/API/SBTarget.cpp lldb/source/Commands/CommandObjectStats.cpp lldb/source/Target/Statistics.cpp lldb/source/Target/Target.cpp lldb/test/API/functionalities/stats_api/main.c
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 8e616afbcb..68df42299d 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -205,9 +205,9 @@ SBStructuredData SBTarget::GetStatistics() {
   if (!target_sp)
     return data;
   std::string json_str =
-      llvm::formatv("{0:2}",
-          DebuggerStats::ReportStatistics(target_sp->GetDebugger(),
-                                          target_sp.get())).str();
+      llvm::formatv("{0:2}", DebuggerStats::ReportStatistics(
+                                 target_sp->GetDebugger(), target_sp.get()))
+          .str();
   data.m_impl_up->SetObjectSP(StructuredData::ParseJSON(json_str));
   return data;
 }
diff --git a/lldb/source/Target/Statistics.cpp b/lldb/source/Target/Statistics.cpp
index 4699710035..3ded19a624 100644
--- a/lldb/source/Target/Statistics.cpp
+++ b/lldb/source/Target/Statistics.cpp
@@ -152,7 +152,8 @@ json::Value TargetStats::ToJSON(Target &target) {
   target_metrics_json.try_emplace("breakpoints", std::move(breakpoints_array));
   target_metrics_json.try_emplace("totalBreakpointResolveTime",
                                   totalBreakpointResolveTime);
-  target_metrics_json.try_emplace("sourceMapDeduceCount", m_source_map_deduce_count);
+  target_metrics_json.try_emplace("sourceMapDeduceCount",
+                                  m_source_map_deduce_count);
 
   return target_metrics_json;
 }
@@ -253,7 +254,7 @@ llvm::json::Value DebuggerStats::ReportStatistics(Debugger &debugger,
       if (module_stat.debug_info_index_saved_to_cache)
         ++debug_index_saved;
       ModuleList symbol_modules = sym_file->GetDebugInfoModules();
-      for (const auto &symbol_module: symbol_modules.Modules())
+      for (const auto &symbol_module : symbol_modules.Modules())
         module_stat.symfile_modules.push_back((intptr_t)symbol_module.get());
       module_stat.symtab_stripped = module->GetObjectFile()->IsStripped();
       if (module_stat.symtab_stripped)
diff --git a/lldb/test/API/functionalities/stats_api/main.c b/lldb/test/API/functionalities/stats_api/main.c
index 03b2213bb9..78f2de106c 100644
--- a/lldb/test/API/functionalities/stats_api/main.c
+++ b/lldb/test/API/functionalities/stats_api/main.c
@@ -1,3 +1 @@
-int main(void) {
-  return 0;
-}
+int main(void) { return 0; }

``````````

</details>


https://github.com/llvm/llvm-project/pull/80915


More information about the lldb-commits mailing list