Reserve fast dictionary slots for Tier1 code (dotnet/coreclr#22619)
authorJan Kotas <jkotas@microsoft.com>
Fri, 15 Feb 2019 16:20:12 +0000 (08:20 -0800)
committerGitHub <noreply@github.com>
Fri, 15 Feb 2019 16:20:12 +0000 (08:20 -0800)
Disable use of fast dictionary slots for R2R images when tiered JITing is enabled.

Fixes dotnet/coreclr#22400

Commit migrated from https://github.com/dotnet/coreclr/commit/bae641f469bebb39b6043071fa55e1fa032bd355

src/coreclr/src/vm/genericdict.cpp

index 90af639..22453c7 100644 (file)
@@ -132,6 +132,15 @@ DictionaryLayout::FindTokenWorker(LoaderAllocator *                 pAllocator,
     }
     CONTRACTL_END
 
+#ifndef FEATURE_NATIVE_IMAGE_GENERATION
+    // If the tiered compilation is on, save the fast dictionary slots for the hot Tier1 code
+    if (g_pConfig->TieredCompilation() && signatureSource == FromReadyToRunImage)
+    {
+        pResult->signature = pSig;
+        return FALSE;
+    }
+#endif
+
     BOOL isFirstBucket = TRUE;
 
     // First bucket also contains type parameters