Bug 896770 - Eagerly baseline compile during parallel warmup. (r=nmatsakis)
authorShu-yu Guo <shu@rfrn.org>
Wed, 24 Jul 2013 07:19:04 -0700
changeset 152126 f907a92e332a636957db0ed8b70e656f12d3b5be
parent 152125 b6d3d9c8440ee29b41da48fe665dc8211c47203a
child 152127 bf069935cd61d5a45eaf9b8ac2e68f0ef84e3287
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnmatsakis
bugs896770
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 896770 - Eagerly baseline compile during parallel warmup. (r=nmatsakis)
js/src/ion/BaselineJIT.cpp
--- a/js/src/ion/BaselineJIT.cpp
+++ b/js/src/ion/BaselineJIT.cpp
@@ -243,17 +243,23 @@ CanEnterBaselineJIT(JSContext *cx, Handl
         return Method_Error;
 
     if (script->hasBaselineScript())
         return Method_Compiled;
 
     // Check script use count. However, always eagerly compile scripts if JSD
     // is enabled, so that we don't have to OSR and don't have to update the
     // frame pointer stored in JSD's frames list.
-    if (IsJSDEnabled(cx)) {
+    //
+    // Also eagerly compile if we are in parallel warmup, the point of which
+    // is to gather type information so that the script may be compiled for
+    // parallel execution. We want to avoid the situation of OSRing during
+    // warmup and only gathering type information for the loop, and not the
+    // rest of the function.
+    if (IsJSDEnabled(cx) || cx->runtime()->parallelWarmup > 0) {
         if (osr)
             return Method_Skipped;
     } else if (script->incUseCount() <= js_IonOptions.baselineUsesBeforeCompile) {
         return Method_Skipped;
     }
 
     if (script->isCallsiteClone) {
         // Ensure the original function is compiled too, so that bailouts from