Fixed the loading of ReadyToRun tuning native image
authorBrian Sullivan <briansul@microsoft.com>
Tue, 6 Jun 2017 18:06:20 +0000 (11:06 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Tue, 6 Jun 2017 18:09:58 +0000 (11:09 -0700)
Corrected the new ifdef that prevented the loading of tuning/profiling ReadyToRun native images
Commented out a costly precondition check, it is always true at all callsites.

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

src/coreclr/src/vm/ceeload.cpp

index ef56342..47810b7 100644 (file)
@@ -467,7 +467,7 @@ void Module::InitializeForProfiling()
     }
     else // ReadyToRun image
     {
-#ifdef FEATURE_READYTORUN_COMPILER
+#ifdef FEATURE_READYTORUN
         // We already setup the m_methodProfileList in the ReadyToRunInfo constructor
         if (m_methodProfileList != nullptr)
         {
@@ -12990,7 +12990,8 @@ idTypeSpec Module::LogInstantiatedType(TypeHandle typeHnd, ULONG flagNum)
         // We can relax this if we allow a (duplicate) MethodTable to live
         // in any module (which might be needed for ngen of generics)
 #ifdef FEATURE_PREJIT
-        PRECONDITION(this == GetPreferredZapModuleForTypeHandle(typeHnd));
+        // All callsites already do this...
+        // PRECONDITION(this == GetPreferredZapModuleForTypeHandle(typeHnd));
 #endif
     }
     CONTRACT_END;