code review feedback
authorDavid Mason <davmason@microsoft.com>
Wed, 26 Jul 2017 19:44:15 +0000 (12:44 -0700)
committerDavid Mason <davmason@microsoft.com>
Wed, 26 Jul 2017 19:44:15 +0000 (12:44 -0700)
src/vm/readytoruninfo.cpp

index 56cfb60..996a862 100644 (file)
@@ -348,9 +348,7 @@ BOOL ReadyToRunInfo::IsReadyToRunEnabled()
     WRAPPER_NO_CONTRACT;
 
     static ConfigDWORD configReadyToRun;
-    return configReadyToRun.val(CLRConfig::EXTERNAL_ReadyToRun) && 
-            !(CORProfilerDisableAllNGenImages()) && 
-            !(CORProfilerUseProfileImages());
+    return configReadyToRun.val(CLRConfig::EXTERNAL_ReadyToRun);
 }
 
 // A log file to record success/failure of R2R loads. s_r2rLogFile can have the following values:
@@ -485,6 +483,12 @@ PTR_ReadyToRunInfo ReadyToRunInfo::Initialize(Module * pModule, AllocMemTracker
         return NULL;
     }
 
+    if (CORProfilerDisableAllNGenImages() || CORProfilerUseProfileImages())
+    {
+        DoLog("Ready to Run disabled - profiler disabled native images");
+        return NULL;
+    }
+
     if (g_pConfig->ExcludeReadyToRun(pModule->GetSimpleName()))
     {
         DoLog("Ready to Run disabled - module on exclusion list");