Revision: 10179
Author: [email protected]
Date: Tue Dec 6 06:30:21 2011
Log: Use the old handler for low frequency idle notifications.
BUG=
TEST=
Review URL: http://codereview.chromium.org/8818005
http://code.google.com/p/v8/source/detail?r=10179
Modified:
/branches/bleeding_edge/src/heap.cc
/branches/bleeding_edge/test/cctest/test-api.cc
/branches/bleeding_edge/test/cctest/test-heap.cc
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon Dec 5 09:21:55 2011
+++ /branches/bleeding_edge/src/heap.cc Tue Dec 6 06:30:21 2011
@@ -4541,9 +4541,10 @@
bool Heap::IdleNotification(int hint) {
+ if (hint >= 1000) return IdleGlobalGC();
if (contexts_disposed_ > 0 || !FLAG_incremental_marking ||
FLAG_expose_gc || Serializer::enabled()) {
- return hint < 1000 ? true : IdleGlobalGC();
+ return true;
}
// By doing small chunks of GC work in each IdleNotification,
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Wed Nov 30 03:13:36 2011
+++ /branches/bleeding_edge/test/cctest/test-api.cc Tue Dec 6 06:30:21 2011
@@ -13454,16 +13454,12 @@
"};"
"binom(1000, 500)");
bool rv = false;
- intptr_t old_size = HEAP->SizeOfObjects();
- bool no_idle_work = v8::V8::IdleNotification();
for (int i = 0; i < 100; i++) {
rv = v8::V8::IdleNotification();
if (rv)
break;
}
CHECK(rv == true);
- intptr_t new_size = HEAP->SizeOfObjects();
- CHECK(no_idle_work || new_size < 3 * old_size / 4);
}
// Test that idle notification can be handled and eventually returns true.
=======================================
--- /branches/bleeding_edge/test/cctest/test-heap.cc Wed Nov 30 08:55:55
2011
+++ /branches/bleeding_edge/test/cctest/test-heap.cc Tue Dec 6 06:30:21
2011
@@ -1312,8 +1312,8 @@
CompileRun(source);
}
intptr_t old_size = HEAP->SizeOfObjects();
- bool no_idle_work = v8::V8::IdleNotification();
- while (!v8::V8::IdleNotification()) ;
+ bool no_idle_work = v8::V8::IdleNotification(900);
+ while (!v8::V8::IdleNotification(900)) ;
intptr_t new_size = HEAP->SizeOfObjects();
CHECK(no_idle_work || new_size < 3 * old_size / 4);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev