[Lldb-commits] [lldb] [lldb] Add count for number of DWO files loaded in statistics (PR #144424)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 17 16:28:47 PDT 2025


================
@@ -353,6 +386,8 @@ llvm::json::Value DebuggerStats::ReportStatistics(
         for (const auto &symbol_module : symbol_modules.Modules())
           module_stat.symfile_modules.push_back((intptr_t)symbol_module.get());
       }
+      UpdateDwoFileCounts(sym_file, total_dwo_file_count,
+                          total_loaded_dwo_file_count);
----------------
clayborg wrote:

We should probably break this down and add statistics for each module using keys named "loadedDwoFileCount" and "dwoFileCount" in each module's statistics.  And then we still add totals at the end as you have. So maybe fetch into module_stat first and then update the totals:
```
UpdateDwoFileCounts(sym_file, module_stat.total_dwo_file_count,
                          module_stat.loaded_dwo_file_count);
total_dwo_file_count += module_stat.total_dwo_file_count;
total_loaded_dwo_file_count += module_stat.loaded_dwo_file_count;
```
We will need to add two things to ModuleStats:
```
uint32_t dwo_file_count = 0;
uint32_t loaded_dwo_file_count = 0;
```

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


More information about the lldb-commits mailing list