Backed out 2 changesets (bug 1000182) for a jit test failure on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 20 Jun 2014 11:18:58 -0700
changeset 189996 c0325443aea0b3db20fec8c66d793a23a42d55a7
parent 189995 ea31eeb8fa0be644528855bb5d3beb92b71e3fcb
child 189997 f44458802800d095cf7a84c91136a1f3fb39ac72
push id8288
push userryanvm@gmail.com
push dateMon, 23 Jun 2014 14:59:00 +0000
treeherderb2g-inbound@c65bf5a0595c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1000182
milestone33.0a1
backs out6abf03bfb9f86c5ad8d8cff579a716e3334dd83c
0a2fd77083e4f06b411870ac1967119299fdf345
Backed out 2 changesets (bug 1000182) for a jit test failure on a CLOSED TREE Backed out changeset 6abf03bfb9f8 (bug 1000182) Backed out changeset 0a2fd77083e4 (bug 1000182)
js/src/jit-test/tests/basic/bug1000182.js
js/src/jit/Ion.cpp
js/src/jit/JitCompartment.h
js/src/tests/lib/jittests.py
deleted file mode 100644
--- a/js/src/jit-test/tests/basic/bug1000182.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// |jit-test| allow-unhandlable-oom;
-function range(n, m) {
-  var result = [];
-    result.push(i);
-  return result;
-    for (var i = 0, l = a.length; i < l; i++) {}
-}
-function b(opFunction, cmpFunction) {
-    var result = opFunction({mode:"compile"});
-      var result = opFunction({mode:"par"});
-}
-function a(arr, op, func, cmpFunc) {
-  b(function (m) { return arr[op + "Par"].apply(arr, [func, m]); }, function(m) {});
-}
-if ("mapPar" in [])
-    a(range(0, 1024), "map", function (i) {});
-oomAfterAllocations(4);
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -526,27 +526,24 @@ JitCompartment::notifyOfActiveParallelEn
     // already in the set.
     if (script->parallelIonScript()->isParallelEntryScript()) {
         MOZ_ASSERT(activeParallelEntryScripts_ && activeParallelEntryScripts_->has(script));
         script->parallelIonScript()->resetParallelAge();
         return true;
     }
 
     if (!activeParallelEntryScripts_) {
-        ScriptSet *scripts = js_new<ScriptSet>();
-        if (!scripts || !scripts->init()) {
-            js_delete(scripts);
-            js_ReportOutOfMemory(cx);
+        activeParallelEntryScripts_ = cx->new_<ScriptSet>(cx);
+        if (!activeParallelEntryScripts_ || !activeParallelEntryScripts_->init())
             return false;
-        }
-        activeParallelEntryScripts_ = scripts;
     }
 
     script->parallelIonScript()->setIsParallelEntryScript();
-    return activeParallelEntryScripts_->put(script);
+    ScriptSet::AddPtr p = activeParallelEntryScripts_->lookupForAdd(script);
+    return p || activeParallelEntryScripts_->add(p, script);
 }
 
 void
 jit::FinishOffThreadBuilder(IonBuilder *builder)
 {
     ExecutionMode executionMode = builder->info().executionMode();
 
     // Clear the recompiling flag of the old ionScript, since we continue to
--- a/js/src/jit/JitCompartment.h
+++ b/js/src/jit/JitCompartment.h
@@ -416,18 +416,17 @@ class JitCompartment
     // since they are only read from during Ion compilation, which may occur
     // off thread and whose barriers are captured during CodeGenerator::link.
     JitCode *stringConcatStub_;
     JitCode *parallelStringConcatStub_;
 
     // Set of JSScripts invoked by ForkJoin (i.e. the entry script). These
     // scripts are marked if their respective parallel IonScripts' age is less
     // than a certain amount. See IonScript::parallelAge_.
-    typedef HashSet<PreBarrieredScript, DefaultHasher<PreBarrieredScript>, SystemAllocPolicy>
-        ScriptSet;
+    typedef HashSet<PreBarrieredScript> ScriptSet;
     ScriptSet *activeParallelEntryScripts_;
 
     JitCode *generateStringConcatStub(JSContext *cx, ExecutionMode mode);
 
   public:
     JitCode *getStubCode(uint32_t key) {
         ICStubCodeMap::AddPtr p = stubCodes_->lookupForAdd(key);
         if (p)
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -79,30 +79,28 @@ class Test:
         self.relpath_top = os.path.relpath(path, TOP_SRC_DIR)
 
         # Path relative to mozilla/js/src/jit-test/tests/.
         self.relpath_tests = os.path.relpath(path, TEST_DIR)
 
         self.jitflags = []     # jit flags to enable
         self.slow = False      # True means the test is slow-running
         self.allow_oom = False # True means that OOM is not considered a failure
-        self.allow_unhandlable_oom = False # True means CrashAtUnhandlableOOM is not considered a failure
         self.allow_overrecursed = False # True means that hitting recursion the
                                         # limits is not considered a failure.
         self.valgrind = False  # True means run under valgrind
         self.tz_pacific = False # True means force Pacific time for the test
         self.expect_error = '' # Errors to expect and consider passing
         self.expect_status = 0 # Exit status to expect from shell
 
     def copy(self):
         t = Test(self.path)
         t.jitflags = self.jitflags[:]
         t.slow = self.slow
         t.allow_oom = self.allow_oom
-        t.allow_unhandlable_oom = self.allow_unhandlable_oom
         t.allow_overrecursed = self.allow_overrecursed
         t.valgrind = self.valgrind
         t.tz_pacific = self.tz_pacific
         t.expect_error = self.expect_error
         t.expect_status = self.expect_status
         return t
 
     COOKIE = '|jit-test|'
@@ -138,18 +136,16 @@ class Test:
                             print("warning: couldn't parse thread-count %s" % value)
                     else:
                         print('warning: unrecognized |jit-test| attribute %s' % part)
                 else:
                     if name == 'slow':
                         test.slow = True
                     elif name == 'allow-oom':
                         test.allow_oom = True
-                    elif name == 'allow-unhandlable-oom':
-                        test.allow_unhandlable_oom = True
                     elif name == 'allow-overrecursed':
                         test.allow_overrecursed = True
                     elif name == 'valgrind':
                         test.valgrind = options.valgrind
                     elif name == 'tz-pacific':
                         test.tz_pacific = True
                     elif name == 'debug':
                         test.jitflags.append('--debugjit')
@@ -389,21 +385,16 @@ def check_output(out, err, rc, timed_out
         if sys.platform in ['win32', 'cygwin'] and rc == 0:
             return True
 
         # Allow a non-zero exit code if we want to allow OOM, but only if we
         # actually got OOM.
         if test.allow_oom and 'out of memory' in err and 'Assertion failure' not in err:
             return True
 
-        # Allow a non-zero exit code if we want to allow unhandlable OOM, but
-        # only if we actually got unhandlable OOM.
-        if test.allow_unhandlable_oom and 'Assertion failure: [unhandlable oom]' in err:
-            return True
-
         # Allow a non-zero exit code if we want to all too-much-recursion and
         # the test actually over-recursed.
         if test.allow_overrecursed and 'too much recursion' in err and 'Assertion failure' not in err:
             return True
 
         return False
 
     return True