@@ -1218,12 +1218,18 @@ PluginManager::GetSymbolLocatorCreateCallbackAtIndex(uint32_t idx) {
12181218}
12191219
12201220ModuleSpec
1221- PluginManager::LocateExecutableObjectFile (const ModuleSpec &module_spec) {
1221+ PluginManager::LocateExecutableObjectFile (const ModuleSpec &module_spec,
1222+ StatisticsMap &map) {
12221223 auto instances = GetSymbolLocatorInstances ().GetSnapshot ();
12231224 for (auto &instance : instances) {
12241225 if (instance.locate_executable_object_file ) {
1225- std::optional<ModuleSpec> result =
1226- instance.locate_executable_object_file (module_spec);
1226+ StatsDuration time;
1227+ std::optional<ModuleSpec> result;
1228+ {
1229+ ElapsedTime elapsed (time);
1230+ result = instance.locate_executable_object_file (module_spec);
1231+ }
1232+ map.add (instance.name , time.get ().count ());
12271233 if (result)
12281234 return *result;
12291235 }
@@ -1232,12 +1238,19 @@ PluginManager::LocateExecutableObjectFile(const ModuleSpec &module_spec) {
12321238}
12331239
12341240FileSpec PluginManager::LocateExecutableSymbolFile (
1235- const ModuleSpec &module_spec, const FileSpecList &default_search_paths) {
1241+ const ModuleSpec &module_spec, const FileSpecList &default_search_paths,
1242+ StatisticsMap &map) {
12361243 auto instances = GetSymbolLocatorInstances ().GetSnapshot ();
12371244 for (auto &instance : instances) {
12381245 if (instance.locate_executable_symbol_file ) {
1239- std::optional<FileSpec> result = instance.locate_executable_symbol_file (
1240- module_spec, default_search_paths);
1246+ StatsDuration time;
1247+ std::optional<FileSpec> result;
1248+ {
1249+ ElapsedTime elapsed (time);
1250+ result = instance.locate_executable_symbol_file (module_spec,
1251+ default_search_paths);
1252+ }
1253+ map.add (instance.name , time.get ().count ());
12411254 if (result)
12421255 return *result;
12431256 }
0 commit comments