Bug 987912 -- Clear thread-local arenas after every iteration r=shu
authorNicholas D. Matsakis <nmatsakis@mozilla.com>
Tue, 25 Mar 2014 14:00:14 -0400
changeset 175668 495ba6baa9fb65f194dbb51258212fc0dc82e454
parent 175667 ddc17f82b75816621665ec6759241fb128bdf8c4
child 175669 3f0dd8c73cf6cb4935dc38135e84f56ae1bf76d6
push id26496
push userkwierso@gmail.com
push dateFri, 28 Mar 2014 02:28:34 +0000
treeherdermozilla-central@3c09159e01da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs987912
milestone31.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 987912 -- Clear thread-local arenas after every iteration r=shu
js/src/builtin/TypedObject.js
js/src/vm/ForkJoin.cpp
--- a/js/src/builtin/TypedObject.js
+++ b/js/src/builtin/TypedObject.js
@@ -1484,23 +1484,23 @@ function MapTypedParImplDepth1(inArray, 
         if (r !== undefined) {
           if (outGrainTypeIsComplex)
             SetTypedObjectValue(outGrainType, outArray, outOffset, r);
           else
             UnsafePutElements(outArray, i, r);
         }
         inOffset += inGrainTypeSize;
         outOffset += outGrainTypeSize;
+
+        // A transparent result type cannot contain references, and
+        // hence there is no way for a pointer to a thread-local object
+        // to escape.
+        if (outGrainTypeIsTransparent)
+          ClearThreadLocalArenas();
       }
-
-      // A transparent result type cannot contain references, and
-      // hence there is no way for a pointer to a thread-local object
-      // to escape.
-      if (outGrainTypeIsTransparent)
-        ClearThreadLocalArenas();
     }
 
     return sliceId;
   }
 
   return undefined;
 }
 SetScriptHints(MapTypedParImplDepth1,         { cloneAtCallsite: true });
--- a/js/src/vm/ForkJoin.cpp
+++ b/js/src/vm/ForkJoin.cpp
@@ -1986,17 +1986,18 @@ class ParallelSpewer
 
         const char *filename = "";
         unsigned line=0, column=0;
         if (script) {
             line = PCToLineNumber(script, pc, &column);
             filename = script->filename();
         }
 
-        spew(SpewOps, "%s%sBAILOUT %d%s: %d at %s:%d:%d", bold(), yellow(), count, reset(), cause, filename, line, column);
+        spew(SpewOps, "%s%sBAILOUT %d%s: %s (%d) at %s:%d:%d", bold(), yellow(), count, reset(),
+             BailoutExplanation(cause), cause, filename, line, column);
     }
 
     void beginCompile(HandleScript script) {
         if (!active[SpewCompile])
             return;
 
         spew(SpewCompile, "COMPILE %p:%s:%u", script.get(), script->filename(), script->lineno());
         depth++;