Revision: 18812
Author: [email protected]
Date: Fri Jan 24 11:36:45 2014 UTC
Log: Speed up some mjsunit test cases and clean up test expectations
for arm and mips.
Many skipped test cases already run very fast. Removing the corresponding
expectations.
BUG=
[email protected], [email protected]
Review URL: https://codereview.chromium.org/138503008
http://code.google.com/p/v8/source/detail?r=18812
Added:
/branches/bleeding_edge/test/mjsunit/compiler/alloc-number-debug.js
/branches/bleeding_edge/test/mjsunit/regress/regress-634-debug.js
Modified:
/branches/bleeding_edge/test/mjsunit/compiler/regress-arguments.js
/branches/bleeding_edge/test/mjsunit/compiler/regress-rep-change.js
/branches/bleeding_edge/test/mjsunit/mjsunit.status
/branches/bleeding_edge/test/mjsunit/regress/regress-490.js
=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/compiler/alloc-number-debug.js Fri
Jan 24 11:36:45 2014 UTC
@@ -0,0 +1,44 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+// Try to get a GC because of a heap number allocation while we
+// have live values (o) in a register.
+function f(o) {
+ var x = 1.5;
+ var y = 2.5;
+ for (var i = 1; i < 3; i += 1) {
+ %SetAllocationTimeout(1, 0, false);
+ o.val = x + y + i;
+ %SetAllocationTimeout(-1, -1, true);
+ }
+ return o;
+}
+
+var o = { val: 0 };
+f(o);
=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-634-debug.js Fri
Jan 24 11:36:45 2014 UTC
@@ -0,0 +1,41 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax
+
+function f() {
+ %SetAllocationTimeout(1, 0, false);
+ a = new Array(0);
+ assertEquals(0, a.length);
+ assertEquals(0, a.length);
+ %SetAllocationTimeout(-1, -1, true);
+}
+
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
=======================================
--- /branches/bleeding_edge/test/mjsunit/compiler/regress-arguments.js Fri
Mar 18 19:41:05 2011 UTC
+++ /branches/bleeding_edge/test/mjsunit/compiler/regress-arguments.js Fri
Jan 24 11:36:45 2014 UTC
@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --allow-natives-syntax
+
// Test of arguments.
// Test passing null or undefined as receiver.
@@ -35,8 +37,15 @@
var foo = 42;
-for (var i=0; i<1000000; i++) assertEquals(42, g());
-for (var i=0; i<1000000; i++) assertEquals(42, h());
+for (var i = 0; i < 3; i++) assertEquals(42, g());
+%OptimizeFunctionOnNextCall(g);
+%OptimizeFunctionOnNextCall(f);
+assertEquals(42, g());
+
+for (var i = 0; i < 3; i++) assertEquals(42, h());
+%OptimizeFunctionOnNextCall(h);
+%OptimizeFunctionOnNextCall(f);
+assertEquals(42, h());
var G1 = 21;
var G2 = 22;
@@ -49,4 +58,7 @@
Number.prototype.foo = 42;
delete Number.prototype.foo;
-for (var i=0; i<100000; i++) assertEquals(void 0, u());
+for (var i = 0; i < 3; i++) assertEquals(void 0, u());
+%OptimizeFunctionOnNextCall(u);
+%OptimizeFunctionOnNextCall(f);
+assertEquals(void 0, u());
=======================================
--- /branches/bleeding_edge/test/mjsunit/compiler/regress-rep-change.js Fri
Mar 18 19:41:05 2011 UTC
+++ /branches/bleeding_edge/test/mjsunit/compiler/regress-rep-change.js Fri
Jan 24 11:36:45 2014 UTC
@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --allow-natives-syntax
+
// Regression test for the case where a phi has two input operands with
// the same value.
@@ -35,8 +37,11 @@
for (var i = start; i < 10; i++) { }
}
-var n = 5000000;
+var n = 3;
for (var i = 0; i < n; ++i) {
test(0);
}
+
+%OptimizeFunctionOnNextCall(test);
+test(0);
=======================================
--- /branches/bleeding_edge/test/mjsunit/mjsunit.status Thu Jan 23 12:13:20
2014 UTC
+++ /branches/bleeding_edge/test/mjsunit/mjsunit.status Fri Jan 24 11:36:45
2014 UTC
@@ -104,6 +104,13 @@
# Tests verifying CHECK and ASSERT.
'verify-check-false': [FAIL, NO_VARIANTS],
'verify-assert-false': [NO_VARIANTS, ['mode == release', PASS], ['mode
== debug', FAIL]],
+
+
##############################################################################
+ # Tests with different versions for release and debug.
+ 'compiler/alloc-number': [PASS, ['mode == debug', SKIP]],
+ 'compiler/alloc-number-debug': [PASS, ['mode == release', SKIP]],
+ 'regress/regress-634': [PASS, ['mode == debug', SKIP]],
+ 'regress/regress-634-debug': [PASS, ['mode == release', SKIP]],
}], # ALWAYS
##############################################################################
@@ -142,30 +149,12 @@
'string-indexof-2': [PASS, TIMEOUT],
'mirror-object': [PASS, TIMEOUT],
- # BUG(3251035): Timeouts in long looping crankshaft optimization
- # tests. Skipping because having them timeout takes too long on the
- # buildbot.
+ # Long running tests. Skipping because having them timeout takes too
long on
+ # the buildbot.
'compiler/alloc-number': [SKIP],
- 'compiler/array-length': [SKIP],
- 'compiler/assignment-deopt': [SKIP],
- 'compiler/deopt-args': [SKIP],
- 'compiler/inline-compare': [SKIP],
- 'compiler/inline-global-access': [SKIP],
- 'compiler/optimized-function-calls': [SKIP],
- 'compiler/pic': [SKIP],
- 'compiler/property-calls': [SKIP],
- 'compiler/recursive-deopt': [SKIP],
- 'compiler/regress-4': [SKIP],
- 'compiler/regress-funcaller': [SKIP],
- 'compiler/regress-rep-change': [SKIP],
- 'compiler/regress-arguments': [SKIP],
- 'compiler/regress-funarguments': [SKIP],
- 'compiler/regress-3249650': [SKIP],
- 'compiler/simple-deopt': [SKIP],
'regress/regress-490': [SKIP],
'regress/regress-634': [SKIP],
'regress/regress-create-exception': [SKIP],
- 'regress/regress-3218915': [SKIP],
'regress/regress-3247124': [SKIP],
# Requires bigger stack size in the Genesis and if stack size is
increased,
@@ -211,30 +200,12 @@
'mirror-object': [PASS, TIMEOUT],
'string-indexof-2': [PASS, TIMEOUT],
- # BUG(3251035): Timeouts in long looping crankshaft optimization
- # tests. Skipping because having them timeout takes too long on the
- # buildbot.
+ # Long running tests. Skipping because having them timeout takes too
long on
+ # the buildbot.
'compiler/alloc-number': [SKIP],
- 'compiler/array-length': [SKIP],
- 'compiler/assignment-deopt': [SKIP],
- 'compiler/deopt-args': [SKIP],
- 'compiler/inline-compare': [SKIP],
- 'compiler/inline-global-access': [SKIP],
- 'compiler/optimized-function-calls': [SKIP],
- 'compiler/pic': [SKIP],
- 'compiler/property-calls': [SKIP],
- 'compiler/recursive-deopt': [SKIP],
- 'compiler/regress-4': [SKIP],
- 'compiler/regress-funcaller': [SKIP],
- 'compiler/regress-rep-change': [SKIP],
- 'compiler/regress-arguments': [SKIP],
- 'compiler/regress-funarguments': [SKIP],
- 'compiler/regress-3249650': [SKIP],
- 'compiler/simple-deopt': [SKIP],
'regress/regress-490': [SKIP],
'regress/regress-634': [SKIP],
'regress/regress-create-exception': [SKIP],
- 'regress/regress-3218915': [SKIP],
'regress/regress-3247124': [SKIP],
# Requires bigger stack size in the Genesis and if stack size is
increased,
=======================================
--- /branches/bleeding_edge/test/mjsunit/regress/regress-490.js Tue Dec 7
11:01:02 2010 UTC
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-490.js Fri Jan 24
11:36:45 2014 UTC
@@ -42,6 +42,9 @@
var b = '';
for (var j = 0; j < 10; j++) {
b += '$1';
+
+ // TODO(machenbach): Do we need all these replacements? Wouldn't corner
+ // cases like smallest and biggest suffice?
a.replace(/^(.*)/, b);
}
a += a;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.