Fix issue where sometimes we would find the same module twice and cause the dotnet...
authorDavid Wrighton <davidwr@microsoft.com>
Wed, 27 Oct 2021 23:25:20 +0000 (16:25 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Oct 2021 23:25:20 +0000 (16:25 -0700)
src/coreclr/tools/dotnet-pgo/TraceRuntimeDescToTypeSystemDesc.cs

index 90e4e96..084f8de 100644 (file)
@@ -243,7 +243,8 @@ namespace Microsoft.Diagnostics.Tools.Pgo
                         continue;
 
                     var currentInfo = new ModuleDescInfo(managedModule.ModuleID, assemblyToFullyQualifiedAssemblyName[managedModule.AssemblyID]);
-                    _modules.Add(managedModule.ModuleID, currentInfo);
+                    if (!_modules.ContainsKey(managedModule.ModuleID))
+                        _modules.Add(managedModule.ModuleID, currentInfo);
                 }
             }
         }