[Lldb-commits] [lldb] Revert "Report only loaded debug info in statistics dump (#81706)" (PR #82150)

via lldb-commits lldb-commits at lists.llvm.org
Sat Feb 17 21:38:43 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

<details>
<summary>Changes</summary>

This reverts commit 21ddd7ff2b166c5e133b460b1a09ee8adb786ccd because it breaks a bunch of tests:

https://lab.llvm.org/buildbot/#/builders/68/builds/69018
https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/16273

---

Patch is 27.56 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/82150.diff


24 Files Affected:

- (modified) lldb/bindings/interface/SBStatisticsOptionsDocstrings.i (-6) 
- (modified) lldb/include/lldb/API/SBStatisticsOptions.h (-8) 
- (modified) lldb/include/lldb/Symbol/SymbolFile.h (+3-11) 
- (modified) lldb/include/lldb/Symbol/SymbolFileOnDemand.h (+1-1) 
- (modified) lldb/include/lldb/Target/Statistics.h (-1) 
- (modified) lldb/source/API/SBStatisticsOptions.cpp (-8) 
- (modified) lldb/source/Commands/CommandObjectStats.cpp (-3) 
- (modified) lldb/source/Commands/Options.td (+1-5) 
- (modified) lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp (+1-1) 
- (modified) lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h (+1-1) 
- (modified) lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp (+2-3) 
- (modified) lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h (+1-1) 
- (modified) lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (+2-2) 
- (modified) lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (+1-1) 
- (modified) lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp (+1-1) 
- (modified) lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h (+1-1) 
- (modified) lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (+1-1) 
- (modified) lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h (+1-1) 
- (modified) lldb/source/Symbol/SymbolFile.cpp (+1-1) 
- (modified) lldb/source/Symbol/SymbolFileOnDemand.cpp (+2-2) 
- (modified) lldb/source/Target/Statistics.cpp (+1-3) 
- (modified) lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py (-35) 
- (removed) lldb/test/API/functionalities/stats_api/main.dwo.yaml (-37) 
- (removed) lldb/test/API/functionalities/stats_api/main.o.yaml (-212) 


``````````diff
diff --git a/lldb/bindings/interface/SBStatisticsOptionsDocstrings.i b/lldb/bindings/interface/SBStatisticsOptionsDocstrings.i
index 087f6ab8786630..f72cf84319e19b 100644
--- a/lldb/bindings/interface/SBStatisticsOptionsDocstrings.i
+++ b/lldb/bindings/interface/SBStatisticsOptionsDocstrings.i
@@ -6,9 +6,3 @@
 ) lldb::SBStatisticsOptions::SetSummaryOnly;
 %feature("docstring", "Gets whether the statistics only dump a summary."
 ) lldb::SBStatisticsOptions::GetSummaryOnly;
-%feature("docstring", "
-    Sets whether the statistics will force loading all possible debug info."
-) lldb::SBStatisticsOptions::SetReportAllAvailableDebugInfo;
-%feature("docstring", "
-    Gets whether the statistics will force loading all possible debug info."
-) lldb::SBStatisticsOptions::GetReportAllAvailableDebugInfo;
diff --git a/lldb/include/lldb/API/SBStatisticsOptions.h b/lldb/include/lldb/API/SBStatisticsOptions.h
index a0055135e36c2a..8019ed4315ca21 100644
--- a/lldb/include/lldb/API/SBStatisticsOptions.h
+++ b/lldb/include/lldb/API/SBStatisticsOptions.h
@@ -25,14 +25,6 @@ class LLDB_API SBStatisticsOptions {
   void SetSummaryOnly(bool b);
   bool GetSummaryOnly();
 
-  /// If set to true, the debugger will load all debug info that is available
-  /// and report statistics on the total amount. If this is set to false, then
-  /// only report statistics on the currently loaded debug information.
-  /// This can avoid loading debug info from separate files just so it can
-  /// report the total size which can slow down statistics reporting.
-  void SetReportAllAvailableDebugInfo(bool b);
-  bool GetReportAllAvailableDebugInfo();
-
 protected:
   friend class SBTarget;
   const lldb_private::StatisticsOptions &ref() const;
diff --git a/lldb/include/lldb/Symbol/SymbolFile.h b/lldb/include/lldb/Symbol/SymbolFile.h
index d20766788192f7..f356f7b789fa38 100644
--- a/lldb/include/lldb/Symbol/SymbolFile.h
+++ b/lldb/include/lldb/Symbol/SymbolFile.h
@@ -381,8 +381,7 @@ class SymbolFile : public PluginInterface {
 
   /// Metrics gathering functions
 
-  /// Return the size in bytes of all loaded debug information or total possible
-  /// debug info in the symbol file.
+  /// Return the size in bytes of all debug information in the symbol file.
   ///
   /// If the debug information is contained in sections of an ObjectFile, then
   /// this call should add the size of all sections that contain debug
@@ -392,14 +391,7 @@ class SymbolFile : public PluginInterface {
   /// entire file should be returned. The default implementation of this
   /// function will iterate over all sections in a module and add up their
   /// debug info only section byte sizes.
-  ///
-  /// \param load_all_debug_info
-  ///   If true, force loading any symbol files if they are not yet loaded and
-  ///   add to the total size. Default to false.
-  ///
-  /// \returns
-  ///   Total currently loaded debug info size in bytes
-  virtual uint64_t GetDebugInfoSize(bool load_all_debug_info = false) = 0;
+  virtual uint64_t GetDebugInfoSize() = 0;
 
   /// Return the time taken to parse the debug information.
   ///
@@ -542,7 +534,7 @@ class SymbolFileCommon : public SymbolFile {
 
   void Dump(Stream &s) override;
 
-  uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
+  uint64_t GetDebugInfoSize() override;
 
   bool GetDebugInfoIndexWasLoadedFromCache() const override {
     return m_index_was_loaded_from_cache;
diff --git a/lldb/include/lldb/Symbol/SymbolFileOnDemand.h b/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
index 8073d1816860e3..4e3009941aa7d6 100644
--- a/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
+++ b/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
@@ -178,7 +178,7 @@ class SymbolFileOnDemand : public lldb_private::SymbolFile {
 
   void PreloadSymbols() override;
 
-  uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
+  uint64_t GetDebugInfoSize() override;
   lldb_private::StatsDuration::Duration GetDebugInfoParseTime() override;
   lldb_private::StatsDuration::Duration GetDebugInfoIndexTime() override;
 
diff --git a/lldb/include/lldb/Target/Statistics.h b/lldb/include/lldb/Target/Statistics.h
index c4f17b503a1f99..f838fa17f80c24 100644
--- a/lldb/include/lldb/Target/Statistics.h
+++ b/lldb/include/lldb/Target/Statistics.h
@@ -132,7 +132,6 @@ struct ConstStringStats {
 
 struct StatisticsOptions {
   bool summary_only = false;
-  bool load_all_debug_info = false;
 };
 
 /// A class that represents statistics for a since lldb_private::Target.
diff --git a/lldb/source/API/SBStatisticsOptions.cpp b/lldb/source/API/SBStatisticsOptions.cpp
index 7e826c4c93ebcd..77a7e26a6bd4b5 100644
--- a/lldb/source/API/SBStatisticsOptions.cpp
+++ b/lldb/source/API/SBStatisticsOptions.cpp
@@ -44,14 +44,6 @@ void SBStatisticsOptions::SetSummaryOnly(bool b) {
 
 bool SBStatisticsOptions::GetSummaryOnly() { return m_opaque_up->summary_only; }
 
-void SBStatisticsOptions::SetReportAllAvailableDebugInfo(bool b) {
-  m_opaque_up->load_all_debug_info = b;
-}
-
-bool SBStatisticsOptions::GetReportAllAvailableDebugInfo() {
-  return m_opaque_up->load_all_debug_info;
-}
-
 const lldb_private::StatisticsOptions &SBStatisticsOptions::ref() const {
   return *m_opaque_up;
 }
diff --git a/lldb/source/Commands/CommandObjectStats.cpp b/lldb/source/Commands/CommandObjectStats.cpp
index a92bb5d1165ee6..b23b7024c82176 100644
--- a/lldb/source/Commands/CommandObjectStats.cpp
+++ b/lldb/source/Commands/CommandObjectStats.cpp
@@ -78,9 +78,6 @@ class CommandObjectStatsDump : public CommandObjectParsed {
       case 's':
         m_stats_options.summary_only = true;
         break;
-      case 'f':
-        m_stats_options.load_all_debug_info = true;
-        break;
       default:
         llvm_unreachable("Unimplemented option");
       }
diff --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td
index ad4321d9a386cc..dd732e35220287 100644
--- a/lldb/source/Commands/Options.td
+++ b/lldb/source/Commands/Options.td
@@ -1419,10 +1419,6 @@ let Command = "statistics dump" in {
   def statistics_dump_all: Option<"all-targets", "a">, Group<1>,
     Desc<"Include statistics for all targets.">;
   def statistics_dump_summary: Option<"summary", "s">, Group<1>,
-    Desc<"Dump only high-level summary statistics. "
+    Desc<"Dump only high-level summary statistics."
          "Exclude targets, modules, breakpoints etc... details.">;
-  def statistics_dump_force: Option<"load-all-debug-info", "f">, Group<1>,
-    Desc<"Dump the total possible debug info statistics. "
-    "Force loading all the debug information if not yet loaded, and collect "
-    "statistics with those.">;
 }
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
index 3977dc3a6d67c5..b1f7397d6b0f00 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
@@ -918,7 +918,7 @@ void SymbolFileBreakpad::ParseUnwindData() {
   m_unwind_data->win.Sort();
 }
 
-uint64_t SymbolFileBreakpad::GetDebugInfoSize(bool load_all_debug_info) {
+uint64_t SymbolFileBreakpad::GetDebugInfoSize() {
   // Breakpad files are all debug info.
   return m_objfile_sp->GetByteSize();
 }
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
index 83215bf3c87e4a..41e4e3b258014c 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
@@ -141,7 +141,7 @@ class SymbolFileBreakpad : public SymbolFileCommon {
 
   llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
 
-  uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
+  uint64_t GetDebugInfoSize() override;
 
 private:
   // A class representing a position in the breakpad file. Useful for
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
index e28036d34b34a6..23e0b8a7f2c06b 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
@@ -896,9 +896,8 @@ void DWARFUnit::ComputeAbsolutePath() {
     m_file_spec->MakeAbsolute(GetCompilationDirectory());
 }
 
-SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile(bool load_all_debug_info) {
-  if (load_all_debug_info)
-    ExtractUnitDIEIfNeeded();
+SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile() {
+  ExtractUnitDIEIfNeeded();
   if (m_dwo)
     return &llvm::cast<SymbolFileDWARFDwo>(m_dwo->GetSymbolFileDWARF());
   return nullptr;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
index 1326fec629fb27..9f6d127056fa56 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
@@ -241,7 +241,7 @@ class DWARFUnit : public UserID {
   FileSpec GetFile(size_t file_idx);
   FileSpec::Style GetPathStyle();
 
-  SymbolFileDWARFDwo *GetDwoSymbolFile(bool load_all_debug_info = false);
+  SymbolFileDWARFDwo *GetDwoSymbolFile();
 
   die_iterator_range dies() {
     ExtractDIEsIfNeeded();
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 42211b9a21b0e3..781f5c5a436778 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2672,7 +2672,7 @@ static bool UpdateCompilerContextForSimpleTemplateNames(TypeQuery &match) {
   return any_context_updated;
 }
 
-uint64_t SymbolFileDWARF::GetDebugInfoSize(bool load_all_debug_info) {
+uint64_t SymbolFileDWARF::GetDebugInfoSize() {
   DWARFDebugInfo &info = DebugInfo();
   uint32_t num_comp_units = info.GetNumUnits();
 
@@ -2687,7 +2687,7 @@ uint64_t SymbolFileDWARF::GetDebugInfoSize(bool load_all_debug_info) {
     if (cu == nullptr)
       continue;
 
-    SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile(load_all_debug_info);
+    SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile();
     if (dwo)
       debug_info_size += dwo->GetDebugInfoSize();
   }
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index 2f8f80f8765cb8..01518b26ca669e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -186,7 +186,7 @@ class SymbolFileDWARF : public SymbolFileCommon {
   GetMangledNamesForFunction(const std::string &scope_qualified_name,
                              std::vector<ConstString> &mangled_names) override;
 
-  uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
+  uint64_t GetDebugInfoSize() override;
 
   void FindTypes(const lldb_private::TypeQuery &match,
                  lldb_private::TypeResults &results) override;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
index a0a7012dfaf0d7..ea23b75c3d708d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
@@ -85,7 +85,7 @@ lldb::offset_t SymbolFileDWARFDwo::GetVendorDWARFOpcodeSize(
   return GetBaseSymbolFile().GetVendorDWARFOpcodeSize(data, data_offset, op);
 }
 
-uint64_t SymbolFileDWARFDwo::GetDebugInfoSize(bool load_all_debug_info) {
+uint64_t SymbolFileDWARFDwo::GetDebugInfoSize() {
   // Directly get debug info from current dwo object file's section list
   // instead of asking SymbolFileCommon::GetDebugInfo() which parses from
   // owning module which is wrong.
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
index c2c420f711d345..d5f48f2a8ed4e2 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
@@ -47,7 +47,7 @@ class SymbolFileDWARFDwo : public SymbolFileDWARF {
                                           const lldb::offset_t data_offset,
                                           const uint8_t op) const override;
 
-  uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
+  uint64_t GetDebugInfoSize() override;
 
   bool ParseVendorDWARFOpcode(uint8_t op, const DataExtractor &opcodes,
                               lldb::offset_t &offset,
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 7fded6a31a3af5..745685a1b31d05 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -2156,7 +2156,7 @@ SymbolFileNativePDB::GetTypeSystemForLanguage(lldb::LanguageType language) {
   return type_system_or_err;
 }
 
-uint64_t SymbolFileNativePDB::GetDebugInfoSize(bool load_all_debug_info) {
+uint64_t SymbolFileNativePDB::GetDebugInfoSize() {
   // PDB files are a separate file that contains all debug info.
   return m_index->pdb().getFileSize();
 }
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
index 669c44aa131edc..82577771f355c8 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
@@ -77,7 +77,7 @@ class SymbolFileNativePDB : public SymbolFileCommon {
 
   void InitializeObject() override;
 
-  uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
+  uint64_t GetDebugInfoSize() override;
 
   // Compile Unit function calls
 
diff --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index 16ed98d7840f78..e318e2beb6547b 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -227,7 +227,7 @@ SymbolFileCommon::GetTypeSystemForLanguage(lldb::LanguageType language) {
   return type_system_or_err;
 }
 
-uint64_t SymbolFileCommon::GetDebugInfoSize(bool load_all_debug_info) {
+uint64_t SymbolFileCommon::GetDebugInfoSize() {
   if (!m_objfile_sp)
     return 0;
   ModuleSP module_sp(m_objfile_sp->GetModule());
diff --git a/lldb/source/Symbol/SymbolFileOnDemand.cpp b/lldb/source/Symbol/SymbolFileOnDemand.cpp
index c6d9f0071c392b..bdb1951d51259d 100644
--- a/lldb/source/Symbol/SymbolFileOnDemand.cpp
+++ b/lldb/source/Symbol/SymbolFileOnDemand.cpp
@@ -535,11 +535,11 @@ void SymbolFileOnDemand::PreloadSymbols() {
   return m_sym_file_impl->PreloadSymbols();
 }
 
-uint64_t SymbolFileOnDemand::GetDebugInfoSize(bool load_all_debug_info) {
+uint64_t SymbolFileOnDemand::GetDebugInfoSize() {
   // Always return the real debug info size.
   LLDB_LOG(GetLog(), "[{0}] {1} is not skipped", GetSymbolFileName(),
            __FUNCTION__);
-  return m_sym_file_impl->GetDebugInfoSize(load_all_debug_info);
+  return m_sym_file_impl->GetDebugInfoSize();
 }
 
 StatsDuration::Duration SymbolFileOnDemand::GetDebugInfoParseTime() {
diff --git a/lldb/source/Target/Statistics.cpp b/lldb/source/Target/Statistics.cpp
index 7f866ae0ef3242..ec0a4c84692dea 100644
--- a/lldb/source/Target/Statistics.cpp
+++ b/lldb/source/Target/Statistics.cpp
@@ -224,7 +224,6 @@ llvm::json::Value DebuggerStats::ReportStatistics(
     const lldb_private::StatisticsOptions &options) {
 
   const bool summary_only = options.summary_only;
-  const bool load_all_debug_info = options.load_all_debug_info;
 
   json::Array json_targets;
   json::Array json_modules;
@@ -281,8 +280,7 @@ llvm::json::Value DebuggerStats::ReportStatistics(
         ++debug_index_saved;
       module_stat.debug_index_time = sym_file->GetDebugInfoIndexTime().count();
       module_stat.debug_parse_time = sym_file->GetDebugInfoParseTime().count();
-      module_stat.debug_info_size =
-          sym_file->GetDebugInfoSize(load_all_debug_info);
+      module_stat.debug_info_size = sym_file->GetDebugInfoSize();
       module_stat.symtab_stripped = module->GetObjectFile()->IsStripped();
       if (module_stat.symtab_stripped)
         ++num_stripped_modules;
diff --git a/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py b/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
index fb2ba603b49172..457a2022fe4b8f 100644
--- a/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
+++ b/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
@@ -117,38 +117,3 @@ def test_command_stats_api(self):
         self.assertNotIn("bt", command_stats)
         # Verify bt's regex command is not duplicatedly captured.
         self.assertNotIn("_regexp-bt", command_stats)
-
-    def test_command_stats_force(self):
-        """
-        Test reporting all pssible debug info stats by force loading all debug
-        info. For example, dwo files
-        """
-        src_dir = self.getSourceDir()
-        dwo_yaml_path = os.path.join(src_dir, "main.dwo.yaml")
-        obj_yaml_path = os.path.join(src_dir, "main.o.yaml")
-        dwo_path = self.getBuildArtifact("main.dwo")
-        obj_path = self.getBuildArtifact("main.o")
-        self.yaml2obj(dwo_yaml_path, dwo_path)
-        self.yaml2obj(obj_yaml_path, obj_path)
-
-        # We need the current working directory to be set to the build directory
-        os.chdir(self.getBuildDir())
-        # Create a target with the object file we just created from YAML
-        target = self.dbg.CreateTarget(obj_path)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Get statistics
-        stats_options = lldb.SBStatisticsOptions()
-        stats = target.GetStatistics(stats_options)
-        stream = lldb.SBStream()
-        stats.GetAsJSON(stream)
-        debug_stats = json.loads(stream.GetData())
-        self.assertEqual(debug_stats["totalDebugInfoByteSize"], 188)
-
-        # Get statistics with force loading
-        stats_options.SetReportAllAvailableDebugInfo(True)
-        stats_force = target.GetStatistics(stats_options)
-        stream_force = lldb.SBStream()
-        stats_force.GetAsJSON(stream_force)
-        debug_stats_force = json.loads(stream_force.GetData())
-        self.assertEqual(debug_stats_force["totalDebugInfoByteSize"], 435)
diff --git a/lldb/test/API/functionalities/stats_api/main.dwo.yaml b/lldb/test/API/functionalities/stats_api/main.dwo.yaml
deleted file mode 100644
index 02396ba33f82f0..00000000000000
--- a/lldb/test/API/functionalities/stats_api/main.dwo.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
---- !ELF
-FileHeader:
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_REL
-  Machine:         EM_X86_64
-  SectionHeaderStringTable: .strtab
-Sections:
-  - Name:            .debug_str.dwo
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_EXCLUDE, SHF_MERGE, SHF_STRINGS ]
-    AddressAlign:    0x1
-    EntSize:         0x1
-    Content:         5F5A33666F6F7600666F6F006D61696E00696E7400636C616E672076657273696F6E2031372E302E36202843656E744F532031372E302E362D342E656C3929006D61696E2E637070006D61696E2E64776F00
-  - Name:            .debug_str_offsets.dwo
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_EXCLUDE ]
-    AddressAlign:    0x1
-    Content:         00000000080000000C00000011000000150000004000000049000000
-  - Name:            .debug_info.dwo
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_EXCLUDE ]
-    AddressAlign:    0x1
-    Content:         3500000004000000000008010421000506939F5FCB7816797B02000600000001560001010103011C0000000156020105340000000403050400
-  - Name:            .debug_abbrev.dwo
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_EXCLUDE ]
-    AddressAlign:    0x1
-    Content:         01110125823E130503823EB042823EB142070000022E0011813E120640186E823E03823E3A0B3B0B3F190000032E0011813E1206401803823E3A0B3B0B49133F19000004240003823E3E0B0B0B000000
-  - Type:            SectionHeaderTable
-    Sections:
-      - Name:            .strtab
-      - Name:            .debug_str.dwo
-      - Name:            .debug_str_offsets.dwo
-      - Name:            .debug_info.dwo
-      - Name:            .debug_abbrev.dwo
-...
diff --git a/lldb/test/API/functionalities/stats_api/main.o.yaml b/lldb/test/API/functionalities/stats_api/main.o.yaml
deleted file mode 100644
index a90b0b3...
[truncated]

``````````

</details>


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


More information about the lldb-commits mailing list