Bug 1353763 - Baldr: Fix slow test (r=bbouvier)
authorLuke Wagner <luke@mozilla.com>
Fri, 14 Apr 2017 09:18:02 -0500
changeset 353121 20e85b5bd3429c3e7386b56fe6c6056d52219eb0
parent 353120 c57012db4d11038ef44faf1aec1005eea5ea2438
child 353122 f90707333e7f6daaaf364bc61890ba2b1849199d
push id89204
push userlwagner@mozilla.com
push dateFri, 14 Apr 2017 14:22:37 +0000
treeherdermozilla-inbound@f90707333e7f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1353763
milestone55.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 1353763 - Baldr: Fix slow test (r=bbouvier) MozReview-Commit-ID: 6Dp6Kn21nBp
js/src/jit-test/tests/wasm/binary.js
--- a/js/src/jit-test/tests/wasm/binary.js
+++ b/js/src/jit-test/tests/wasm/binary.js
@@ -349,21 +349,30 @@ wasmEval(moduleWithSections([memorySecti
 assertErrorMessage(() => wasmEval(moduleWithSections([invalidMemorySection2()])), CompileError, /number of memories must be at most one/);
 
 // Test early 'end'
 const bodyMismatch = /function body length mismatch/;
 assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:[EndCode]})])])), CompileError, bodyMismatch);
 assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:[UnreachableCode,EndCode]})])])), CompileError, bodyMismatch);
 assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:[EndCode,UnreachableCode]})])])), CompileError, bodyMismatch);
 
-// Deep nesting shouldn't crash or even throw.
-var manyBlocks = [];
-for (var i = 0; i < 20000; i++)
-    manyBlocks.push(BlockCode, VoidCode, EndCode);
-wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:manyBlocks})])]));
+// Deep nesting shouldn't crash or even throw. This test takes a long time to
+// run with the JITs disabled, so to avoid occasional timeout, disable. Also
+// in eager mode, this triggers pathological recompilation, so only run for
+// "normal" JIT modes. This test is totally independent of the JITs so this
+// shouldn't matter.
+var jco = getJitCompilerOptions();
+if (jco["ion.enable"] && jco["baseline.enable"] && jco["baseline.warmup.trigger"] > 0 && jco["ion.warmup.trigger"] > 10) {
+    var manyBlocks = [];
+    for (var i = 0; i < 20000; i++)
+        manyBlocks.push(BlockCode, VoidCode);
+    for (var i = 0; i < 20000; i++)
+        manyBlocks.push(EndCode);
+    wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:manyBlocks})])]));
+}
 
 // Ignore errors in name section.
 var tooBigNameSection = {
     name: userDefinedId,
     body: [...string(nameName), ...varU32(Math.pow(2, 31))] // declare 2**31 functions.
 };
 wasmEval(moduleWithSections([tooBigNameSection]));