Bug 822089 - Don't compile off thread when profiling scripts, r=dvander.
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 18 Dec 2012 16:34:34 -0700
changeset 125565 96de6d7f081394255c89dcd7339920cb0620c55b
parent 125564 b3d7e749388b30ae5765e62ae7393c6efd87e086
child 125566 e88bfc91fb9ab17f7f9c6b4af860cc4111464272
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs822089
milestone20.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 822089 - Don't compile off thread when profiling scripts, r=dvander.
js/src/ion/Ion.cpp
--- a/js/src/ion/Ion.cpp
+++ b/js/src/ion/Ion.cpp
@@ -1204,20 +1204,23 @@ SequentialCompileContext::compile(IonBui
     if (!builder->build()) {
         IonSpew(IonSpew_Abort, "Builder failed to build.");
         return false;
     }
     builder->clearForBackEnd();
 
     // Try to compile the script off thread, if possible. Compilation cannot be
     // performed off thread during an incremental GC, as doing so may trip
-    // incremental read barriers.
+    // incremental read barriers. Also skip off thread compilation if script
+    // execution is being profiled, as CodeGenerator::maybeCreateScriptCounts
+    // will not attach script profiles when running off thread.
     if (js_IonOptions.parallelCompilation &&
         OffThreadCompilationAvailable(cx) &&
-        cx->runtime->gcIncrementalState == gc::NO_INCREMENTAL)
+        cx->runtime->gcIncrementalState == gc::NO_INCREMENTAL &&
+        !cx->runtime->profilingScripts)
     {
         builder->script()->ion = ION_COMPILING_SCRIPT;
 
         if (!StartOffThreadIonCompile(cx, builder)) {
             IonSpew(IonSpew_Abort, "Unable to start off-thread ion compilation.");
             return false;
         }