Bug 1496297 - Use |jit-test| skip-if as appropriate in jit-test/tests/heap-analysis/ (r=jorendorff)
authorEric Faust <efausbmo@gmail.com>
Tue, 09 Oct 2018 15:41:50 -0700
changeset 496136 179b81691182a23085d1bd73931e4d86842677f8
parent 496135 de0ab3ea1796c48872614041a6e87b34073a184a
child 496137 c8b420c49253532689f462813d7c9673ba798165
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1496297
milestone64.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 1496297 - Use |jit-test| skip-if as appropriate in jit-test/tests/heap-analysis/ (r=jorendorff)
js/src/jit-test/tests/heap-analysis/byteSize-of-object.js
js/src/jit-test/tests/heap-analysis/byteSize-of-string.js
js/src/jit-test/tests/heap-analysis/byteSize-of-symbol.js
--- a/js/src/jit-test/tests/heap-analysis/byteSize-of-object.js
+++ b/js/src/jit-test/tests/heap-analysis/byteSize-of-object.js
@@ -1,22 +1,21 @@
+// |jit-test| skip-if: !getBuildConfiguration()['moz-memory']
+// Run this test only if we're using jemalloc. Other malloc implementations
+// exhibit surprising behaviors. For example, 32-bit Fedora builds have
+// non-deterministic allocation sizes.
+
 // Check that JS::ubi::Node::size returns reasonable results for objects.
 
 // We actually hard-code specific sizes into this test, even though they're
 // implementation details, because in practice there are only two architecture
 // variants to consider (32-bit and 64-bit), and if these sizes change, that's
 // something SpiderMonkey hackers really want to know; they're supposed to be
 // stable.
 
-// Run this test only if we're using jemalloc. Other malloc implementations
-// exhibit surprising behaviors. For example, 32-bit Fedora builds have
-// non-deterministic allocation sizes.
-if (!getBuildConfiguration()['moz-memory'])
-  quit(0);
-
 if (getBuildConfiguration()['pointer-byte-size'] == 4)
   var s = (s32, s64) => s32
 else
   var s = (s32, s64) => s64
 
 function tenure(obj) {
   gc();
   return obj;
--- a/js/src/jit-test/tests/heap-analysis/byteSize-of-string.js
+++ b/js/src/jit-test/tests/heap-analysis/byteSize-of-string.js
@@ -1,22 +1,22 @@
+// |jit-test| skip-if: !getBuildConfiguration()['moz-memory']
+// Run this test only if we're using jemalloc. Other malloc implementations
+// exhibit surprising behaviors. For example, 32-bit Fedora builds have
+// non-deterministic allocation sizes.
+
 // Check JS::ubi::Node::size results for strings.
 
 // We actually hard-code specific sizes into this test, even though they're
 // implementation details, because in practice there are only two architecture
 // variants to consider (32-bit and 64-bit), and if these sizes change, that's
 // something SpiderMonkey hackers really want to know; they're supposed to be
 // stable.
 
-// Run this test only if we're using jemalloc. Other malloc implementations
-// exhibit surprising behaviors. For example, 32-bit Fedora builds have
-// non-deterministic allocation sizes.
 var config = getBuildConfiguration();
-if (!config['moz-memory'])
-  quit(0);
 
 gczeal(0); // Need to control when tenuring happens
 
 // Hack to skip this test if strings are not allocated in the nursery.
 {
   const sample_nursery = "x" + "abc".substr(1);
   let nursery_enabled = true;
   const before = byteSize(sample_nursery);
--- a/js/src/jit-test/tests/heap-analysis/byteSize-of-symbol.js
+++ b/js/src/jit-test/tests/heap-analysis/byteSize-of-symbol.js
@@ -1,22 +1,22 @@
+// |jit-test| skip-if: !getBuildConfiguration()['moz-memory']
+// Run this test only if we're using jemalloc. Other malloc implementations
+// exhibit surprising behaviors. For example, 32-bit Fedora builds have
+// non-deterministic allocation sizes.
+
 // Check JS::ubi::Node::size results for symbols.
 
 // We actually hard-code specific sizes into this test, even though they're
 // implementation details, because in practice there are only two architecture
 // variants to consider (32-bit and 64-bit), and if these sizes change, that's
 // something SpiderMonkey hackers really want to know; they're supposed to be
 // stable.
 
-// Run this test only if we're using jemalloc. Other malloc implementations
-// exhibit surprising behaviors. For example, 32-bit Fedora builds have
-// non-deterministic allocation sizes.
 var config = getBuildConfiguration();
-if (!config['moz-memory'])
-  quit(0);
 
 const SIZE_OF_SYMBOL = config['pointer-byte-size'] == 4 ? 16 : 16;
 
 // Without a description.
 assertEq(byteSize(Symbol()), SIZE_OF_SYMBOL);
 
 // With a description.
 assertEq(byteSize(Symbol("This is a relatively long description to be passed to "