[Lldb-commits] [lldb] [lldb] Add count for number of DWO files loaded in statistics (PR #144424)
David Peixotto via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 17 14:04:49 PDT 2025
================
@@ -512,6 +522,119 @@ def test_breakpoints(self):
self.verify_keys(
breakpoint, 'target_stats["breakpoints"]', bp_keys_exist, None
)
+ def test_non_split_dwarf_has_no_dwo_files(self):
+ """
+ Test "statistics dump" and the dwo file count.
+ Builds a binary without split-dwarf mode, and then
+ verifies the dwo file count is zero after running "statistics dump"
+ """
+ da = {"CXX_SOURCES": "third.cpp baz.cpp", "EXE": self.getBuildArtifact("a.out")}
+ self.build(dictionary=da, debug_info=["debug_names"])
+ self.addTearDownCleanup(dictionary=da)
+ exe = self.getBuildArtifact("a.out")
+ target = self.createTestTarget(file_path=exe)
+ debug_stats = self.get_stats()
+ self.assertIn("totalDwoFileCount", debug_stats)
+ self.assertIn("totalLoadedDwoFileCount", debug_stats)
+
+ # Verify that the dwo file count is zero
+ self.assertEqual(debug_stats["totalDwoFileCount"], 0)
+ self.assertEqual(debug_stats["totalLoadedDwoFileCount"], 0)
+
+ def test_debug_names_eager_loads_dwo_files(self):
----------------
dmpots wrote:
nit: The name `test_debug_names_eager_loads_dwo_files` makes it sound like we are checking that debug names causes eager loading, but we are actually checking the opposite.
https://github.com/llvm/llvm-project/pull/144424
More information about the lldb-commits
mailing list