Commit e8a399c0 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Speed up tests for optimized code sharing.

Note that this tests performed unnecessary many iterations which led to
long runtimes in debug mode and also caused flaky GCs during that would
cause the optimized code map to be flushed and violated assumptions.

R=yangguo@chromium.org
BUG=v8:4363
LOG=N

Review URL: https://codereview.chromium.org/1280973002

Cr-Commit-Position: refs/heads/master@{#30070}
parent 651f55c5
......@@ -376,7 +376,7 @@ TEST(OptimizedCodeSharing1) {
FLAG_cache_optimized_code = true;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
for (int i = 0; i < 10; i++) {
for (int i = 0; i < 3; i++) {
LocalContext env;
env->Global()->Set(v8::String::NewFromUtf8(CcTest::isolate(), "x"),
v8::Integer::New(CcTest::isolate(), i));
......@@ -432,7 +432,7 @@ TEST(OptimizedCodeSharing2) {
CHECK(fun0->IsOptimized() || !CcTest::i_isolate()->use_crankshaft());
reference_code = handle(fun0->code());
}
for (int i = 0; i < 10; i++) {
for (int i = 0; i < 3; i++) {
LocalContext env;
env->Global()->Set(v8::String::NewFromUtf8(CcTest::isolate(), "x"),
v8::Integer::New(CcTest::isolate(), i));
......@@ -490,7 +490,7 @@ TEST(OptimizedCodeSharing3) {
// leaves it in a state where only the context-independent entry exists.
fun0->shared()->TrimOptimizedCodeMap(SharedFunctionInfo::kEntryLength);
}
for (int i = 0; i < 10; i++) {
for (int i = 0; i < 3; i++) {
LocalContext env;
env->Global()->Set(v8::String::NewFromUtf8(CcTest::isolate(), "x"),
v8::Integer::New(CcTest::isolate(), i));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment