Reviewers: Yang,

Description:
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.

[email protected]
BUG=v8:4363
LOG=N

Please review this at https://codereview.chromium.org/1280973002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+3, -3 lines):
  M test/cctest/test-compiler.cc


Index: test/cctest/test-compiler.cc
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index e7ced4dee07d53df86da1304191a8a6a3e55232c..e35b430555187f59af58995f428a0de16a8579ed 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -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));


--
--
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/d/optout.

Reply via email to