Preparation to introduce parallelism into CrossGen2 (dotnet/coreclr#27068)
authorAnubhav Srivastava <SrivastavaAnubhav@users.noreply.github.com>
Wed, 16 Oct 2019 18:24:12 +0000 (11:24 -0700)
committerFadi Hanna <fadim@microsoft.com>
Wed, 16 Oct 2019 18:24:12 +0000 (11:24 -0700)
commit8fe52d9dfa549a4a654929a919808db7bf19af5d
tree0850bb097c331a3ef4761e552e615b43c97d3066
parent6e1e2941853c2bb84d47e79d314e027fb2458273
Preparation to introduce parallelism into CrossGen2 (dotnet/coreclr#27068)

* Preparation to introduce parallelism into CrossGen2

- Change dictionaries in ReadyToRunCodegenNodeFactory and ReadyToRunSymbolNodeFactory to NodeCaches (i.e. ConcurrentDictionary, at the moment)
- Add structs to act as keys for the above NodeCaches (MethodFixupKey, DynamicHelperKey, ReadyToRunHelperKey)
- Synchronize logger
- Update some Dictionaries to ConcurrentDictionary
- Add .Equals and GetHashCode to SignatureContext.

Commit migrated from https://github.com/dotnet/coreclr/commit/2ac3fc45d5ea5100caaf578dd4baaa1f9fd28640
12 files changed:
src/coreclr/src/tools/crossgen2/Common/Compiler/Logger.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodWithGCInfo.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureContext.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunSymbolNodeFactory.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/TypeAndMethod.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/ReadyToRunMetadataFieldLayoutAlgorithm.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/ReadyToRunSingleAssemblyCompilationModuleGroup.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/ReadyToRunTableManager.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs