@@ -1217,12 +1217,18 @@ PluginManager::GetSymbolLocatorCreateCallbackAtIndex(uint32_t idx) {
12171217}
12181218
12191219ModuleSpec
1220- PluginManager::LocateExecutableObjectFile (const ModuleSpec &module_spec) {
1220+ PluginManager::LocateExecutableObjectFile (const ModuleSpec &module_spec,
1221+ StatisticsMap &map) {
12211222 auto instances = GetSymbolLocatorInstances ().GetSnapshot ();
12221223 for (auto &instance : instances) {
12231224 if (instance.locate_executable_object_file ) {
1224- std::optional<ModuleSpec> result =
1225- instance.locate_executable_object_file (module_spec);
1225+ StatsDuration time;
1226+ std::optional<ModuleSpec> result;
1227+ {
1228+ ElapsedTime elapsed (time);
1229+ result = instance.locate_executable_object_file (module_spec);
1230+ }
1231+ map.add (instance.name , time.get ().count ());
12261232 if (result)
12271233 return *result;
12281234 }
@@ -1231,12 +1237,19 @@ PluginManager::LocateExecutableObjectFile(const ModuleSpec &module_spec) {
12311237}
12321238
12331239FileSpec PluginManager::LocateExecutableSymbolFile (
1234- const ModuleSpec &module_spec, const FileSpecList &default_search_paths) {
1240+ const ModuleSpec &module_spec, const FileSpecList &default_search_paths,
1241+ StatisticsMap &map) {
12351242 auto instances = GetSymbolLocatorInstances ().GetSnapshot ();
12361243 for (auto &instance : instances) {
12371244 if (instance.locate_executable_symbol_file ) {
1238- std::optional<FileSpec> result = instance.locate_executable_symbol_file (
1239- module_spec, default_search_paths);
1245+ StatsDuration time;
1246+ std::optional<FileSpec> result;
1247+ {
1248+ ElapsedTime elapsed (time);
1249+ result = instance.locate_executable_symbol_file (module_spec,
1250+ default_search_paths);
1251+ }
1252+ map.add (instance.name , time.get ().count ());
12401253 if (result)
12411254 return *result;
12421255 }
0 commit comments