[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 18 11:55:53 PDT 2025


================
@@ -814,8 +814,16 @@ Status PlatformDarwinKernel::GetSharedModuleKernel(
         // append ".dSYM" to the filename for the SymbolFile.
         FileSpecList search_paths =
             process->GetTarget().GetDebugFileSearchPaths();
-        FileSpec dsym_fspec =
-            PluginManager::LocateExecutableSymbolFile(kern_spec, search_paths);
+        StatsDuration locate_duration;
+        std::string locator_name;
+        FileSpec dsym_fspec;
+        {
+          ElapsedTime elapsed(locate_duration);
+          dsym_fspec = PluginManager::LocateExecutableSymbolFile(
+              kern_spec, search_paths, &locator_name);
+        }
+        module_sp->GetSymbolLocatorStatistics().add(
+            locator_name, locate_duration.get().count());
----------------
clayborg wrote:

Same thing here as well, but since we already have a module here we can just pass it directly and no need to merge:
```
dsym_fspec = PluginManager::LocateExecutableSymbolFile(
              kern_spec, search_paths, module_sp->GetSymbolLocatorStatistics());
```



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


More information about the lldb-commits mailing list