Reviewers: Igor Sheludko,
Description:
Speed up long-running test cases.
[email protected]
Please review this at https://codereview.chromium.org/85163003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+37, -33 lines):
M test/cctest/test-debug.cc
M test/mjsunit/compiler/math-floor-global.js
M test/mjsunit/compiler/math-floor-local.js
M test/mjsunit/compiler/regress-4.js
M test/mjsunit/debug-step-4-in-frame.js
M test/mjsunit/harmony/private.js
M test/mjsunit/harmony/symbols.js
M test/mjsunit/json2.js
M test/mjsunit/limit-locals.js
M test/mjsunit/math-floor-part1.js
M test/mjsunit/regress/regress-2318.js
M test/mjsunit/regress/regress-json-stringify-gc.js
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index
eb9789ab36d211c27c051fff6c46bb1de2f4be00..00e40203c7f568bcb349ebc7d00c23ba4876d961
100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -7514,9 +7514,9 @@ static void TestDebugBreakInLoop(const char*
loop_head,
for (int i = 0; loop_bodies[i] != NULL; i++) {
// Perform a lazy deoptimization after various numbers of breaks
// have been hit.
- for (int j = 0; j < 11; j++) {
+ for (int j = 0; j < 7; j++) {
break_point_hit_count_deoptimize = j;
- if (j == 10) {
+ if (j == 6) {
break_point_hit_count_deoptimize = kBreaksPerTest;
}
Index: test/mjsunit/compiler/math-floor-global.js
diff --git a/test/mjsunit/compiler/math-floor-global.js
b/test/mjsunit/compiler/math-floor-global.js
index
9ec183fab1b0a416d7a9257bdcefeaeac2419ef7..3b9d1254537dce8d3dfb8a09ca0deacc278d57ff
100644
--- a/test/mjsunit/compiler/math-floor-global.js
+++ b/test/mjsunit/compiler/math-floor-global.js
@@ -25,7 +25,7 @@
// (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: --max-new-space-size=256 --allow-natives-syntax
+// Flags: --max-new-space-size=128 --allow-natives-syntax
// Test inlining of Math.floor when assigned to a global.
var flo = Math.floor;
@@ -140,8 +140,9 @@ function test() {
// Test in a loop to cover the custom IC and GC-related issues.
-for (var i = 0; i < 50; i++) {
+for (var i = 0; i < 10; i++) {
test();
+ new Array(i * 10000);
}
@@ -158,4 +159,4 @@ assertEquals(-0, floorsum(1, -0));
%OptimizeFunctionOnNextCall(floorsum);
// The optimized function will deopt. Run it with enough iterations to try
// to optimize via OSR (triggering the bug).
-assertEquals(-0, floorsum(100000, -0));
+assertEquals(-0, floorsum(50000, -0));
Index: test/mjsunit/compiler/math-floor-local.js
diff --git a/test/mjsunit/compiler/math-floor-local.js
b/test/mjsunit/compiler/math-floor-local.js
index
e44b15c734c5a124c1663940fc95b9df3546da05..fef3347e800bf083069a32106d12fa65467b6fc2
100644
--- a/test/mjsunit/compiler/math-floor-local.js
+++ b/test/mjsunit/compiler/math-floor-local.js
@@ -25,7 +25,7 @@
// (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: --max-new-space-size=256 --allow-natives-syntax
+// Flags: --max-new-space-size=128 --allow-natives-syntax
// Test inlining of Math.floor when assigned to a local.
var test_id = 0;
@@ -140,8 +140,9 @@ function test() {
// Test in a loop to cover the custom IC and GC-related issues.
-for (var i = 0; i < 50; i++) {
+for (var i = 0; i < 10; i++) {
test();
+ new Array(i * 10000);
}
Index: test/mjsunit/compiler/regress-4.js
diff --git a/test/mjsunit/compiler/regress-4.js
b/test/mjsunit/compiler/regress-4.js
index
0ec9a12b81dc23746948f727c19b3a7056795bf9..9a212baf2d74e2ce7936fe50b953c70bc0ea016f
100644
--- a/test/mjsunit/compiler/regress-4.js
+++ b/test/mjsunit/compiler/regress-4.js
@@ -34,7 +34,7 @@ function f(p) {
return y+x;
}
-for (var i=0; i<10000000; i++) f(42);
+for (var i=0; i<100000; i++) f(42);
var result = f("foo");
assertEquals("0foo6", result);
Index: test/mjsunit/debug-step-4-in-frame.js
diff --git a/test/mjsunit/debug-step-4-in-frame.js
b/test/mjsunit/debug-step-4-in-frame.js
index
65ac4902dd9f0863ce894863fdc168cb813bc600..93884303ca78ce65345de0db3bdc6a8a861dedcc
100644
--- a/test/mjsunit/debug-step-4-in-frame.js
+++ b/test/mjsunit/debug-step-4-in-frame.js
@@ -37,18 +37,18 @@ var state;
function f() {
var a = 1978;
- for (state[2] = 0; state[2] < 5; state[2]++) {
+ for (state[2] = 0; state[2] < 3; state[2]++) {
void String(a);
}
}
function g() {
- for (state[1] = 0; state[1] < 5; state[1]++) {
+ for (state[1] = 0; state[1] < 3; state[1]++) {
f();
}
}
function h() {
state = [-1, -1, -1];
- for (state[0] = 0; state[0] < 5; state[0]++) {
+ for (state[0] = 0; state[0] < 3; state[0]++) {
g();
}
}
@@ -123,10 +123,10 @@ TestCase(0, 5, "0,0,1");
TestCase(0, 8, "0,0,3");
// Stepping in the frame #1.
-TestCase(1, 0, "0,0,5");
-TestCase(1, 3, "0,1,5");
-TestCase(1, 8, "0,4,5");
+TestCase(1, 0, "0,0,3");
+TestCase(1, 3, "0,1,3");
+TestCase(1, 7, "0,3,3");
// Stepping in the frame #2.
-TestCase(2, 3, "1,5,5");
-TestCase(2, 8, "4,5,5");
+TestCase(2, 3, "1,3,3");
+TestCase(2, 7, "3,3,3");
Index: test/mjsunit/harmony/private.js
diff --git a/test/mjsunit/harmony/private.js
b/test/mjsunit/harmony/private.js
index
884e31ba0a2b6696ac4220e96ad5c2ab150fd58b..09cf7f74084082e36ab1d66391022985dffe492c
100644
--- a/test/mjsunit/harmony/private.js
+++ b/test/mjsunit/harmony/private.js
@@ -317,7 +317,7 @@ function TestCachedKeyAfterScavenge() {
var a = {};
a[key] = "abc";
- for (var i = 0; i < 1000000; i++) {
+ for (var i = 0; i < 100000; i++) {
a[key] += "a"; // Allocations cause a scavenge.
}
}
Index: test/mjsunit/harmony/symbols.js
diff --git a/test/mjsunit/harmony/symbols.js
b/test/mjsunit/harmony/symbols.js
index
1fc3945397e1575c8e8cd58c4e253a4a8792f2c6..3fcd06dfdca985fcd81abd8630cb8ededa8fe0d7
100644
--- a/test/mjsunit/harmony/symbols.js
+++ b/test/mjsunit/harmony/symbols.js
@@ -345,7 +345,7 @@ function TestCachedKeyAfterScavenge() {
var a = {};
a[key] = "abc";
- for (var i = 0; i < 1000000; i++) {
+ for (var i = 0; i < 100000; i++) {
a[key] += "a"; // Allocations cause a scavenge.
}
}
Index: test/mjsunit/json2.js
diff --git a/test/mjsunit/json2.js b/test/mjsunit/json2.js
index
cf20b909b4253caa7845d2cd6a63decd307149fb..39affe9330dbc12f6e9b432275baf238373361bd
100644
--- a/test/mjsunit/json2.js
+++ b/test/mjsunit/json2.js
@@ -40,12 +40,13 @@ function TestStringify(expected, input) {
var array_1 = [];
var array_2 = [];
-array_1[100000] = 1;
-array_2[100000] = function() { return 1; };
-var nulls = "";
-for (var i = 0; i < 100000; i++) {
- nulls += 'null,';
+array_1[1<<13] = 1;
+array_2[1<<13] = function() { return 1; };
+var nulls = "null,";
+for (var i = 0; i < 13; i++) {
+ nulls += nulls;
}
+
expected_1 = '[' + nulls + '1]';
expected_2 = '[' + nulls + 'null]';
TestStringify(expected_1, array_1);
Index: test/mjsunit/limit-locals.js
diff --git a/test/mjsunit/limit-locals.js b/test/mjsunit/limit-locals.js
index
a166f30617c21f307048b96feb8fa0038dd43f4d..1d36c80e5d643d5ee9c48543d185a64de3ec72ee
100644
--- a/test/mjsunit/limit-locals.js
+++ b/test/mjsunit/limit-locals.js
@@ -34,9 +34,9 @@ function function_with_n_locals(n) {
test_suffix = " suffix";
var src = "test_prefix + (function () {"
for (var i = 1; i <= n; i++) {
- src += "var x" + i + ";";
+ src += "; var x" + i;
}
- src += "return " + n + ";})() + test_suffix";
+ src += "; return " + n + ";})() + test_suffix";
return eval(src);
}
Index: test/mjsunit/math-floor-part1.js
diff --git a/test/mjsunit/math-floor-part1.js
b/test/mjsunit/math-floor-part1.js
index
313f27236a618701e5160da41dcf2de6504dcb89..dd4deb0a06025ccae4b65787c9da71b14b135229
100644
--- a/test/mjsunit/math-floor-part1.js
+++ b/test/mjsunit/math-floor-part1.js
@@ -25,7 +25,7 @@
// (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: --max-new-space-size=256 --allow-natives-syntax
+// Flags: --max-new-space-size=128 --allow-natives-syntax
var test_id = 0;
@@ -83,6 +83,7 @@ function test() {
// Test in a loop to cover the custom IC and GC-related issues.
-for (var i = 0; i < 100; i++) {
+for (var i = 0; i < 10; i++) {
test();
+ new Array(i * 10000);
}
Index: test/mjsunit/regress/regress-2318.js
diff --git a/test/mjsunit/regress/regress-2318.js
b/test/mjsunit/regress/regress-2318.js
index
ca67ab2ca5f8a700904b8c52dd120196da729d66..5fa8a4f960fc141920ccf565b6e20d3183e62b18
100644
--- a/test/mjsunit/regress/regress-2318.js
+++ b/test/mjsunit/regress/regress-2318.js
@@ -25,7 +25,7 @@
// (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: --expose-debug-as debug --nostack-trace-on-abort
+// Flags: --expose-debug-as debug --nostack-trace-on-abort --stack-size=100
function f() {
var i = 0;
Index: test/mjsunit/regress/regress-json-stringify-gc.js
diff --git a/test/mjsunit/regress/regress-json-stringify-gc.js
b/test/mjsunit/regress/regress-json-stringify-gc.js
index
4b355ae1acbad7e0ac3687b2a2c48ba70be2e753..905ab406941aca89739dfeec7be2282a428f2324
100644
--- a/test/mjsunit/regress/regress-json-stringify-gc.js
+++ b/test/mjsunit/regress/regress-json-stringify-gc.js
@@ -26,9 +26,9 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
var a = [];
-var new_space_string = "";
-for (var i = 0; i < 128; i++) {
- new_space_string += String.fromCharCode((Math.random() * 26 + 65) | 0);
+var new_space_string = "a";
+for (var i = 0; i < 8; i++) {
+ new_space_string += new_space_string;
}
for (var i = 0; i < 10000; i++) a.push(new_space_string);
@@ -40,12 +40,12 @@ json2 = JSON.stringify(a);
assertTrue(json1 == json2, "GC caused JSON.stringify to fail.");
// Check that the slow path of JSON.stringify works correctly wrt GC.
-for (var i = 0; i < 100000; i++) {
+for (var i = 0; i < 10000; i++) {
var s = i.toString();
assertEquals('"' + s + '"', JSON.stringify(s, null, 0));
}
-for (var i = 0; i < 100000; i++) {
+for (var i = 0; i < 10000; i++) {
var s = i.toString() + "\u2603";
assertEquals('"' + s + '"', JSON.stringify(s, null, 0));
}
--
--
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.