Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: test/cctest/test-heap.cc

Issue 254603002: Remove lazy sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/store-buffer.cc ('k') | test/mjsunit/regress/regress-1708.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 0b0c7041f528512cf2c6976c9bca96e86e2a1e2e..92522fd45b11b6f52bd517838418a7c1df82f16c 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -1606,12 +1606,16 @@ TEST(TestSizeOfObjects) {
CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
- CHECK(CcTest::heap()->old_pointer_space()->IsLazySweepingComplete());
+ MarkCompactCollector* collector = CcTest::heap()->mark_compact_collector();
+ if (collector->IsConcurrentSweepingInProgress()) {
+ collector->WaitUntilSweepingCompleted();
+ }
int initial_size = static_cast<int>(CcTest::heap()->SizeOfObjects());
{
// Allocate objects on several different old-space pages so that
- // lazy sweeping kicks in for subsequent GC runs.
+ // concurrent sweeper threads will be busy sweeping the old space on
+ // subsequent GC runs.
AlwaysAllocateScope always_allocate(CcTest::i_isolate());
int filler_size = static_cast<int>(FixedArray::SizeFor(8192));
for (int i = 1; i <= 100; i++) {
@@ -1629,11 +1633,11 @@ TEST(TestSizeOfObjects) {
CHECK_EQ(initial_size, static_cast<int>(CcTest::heap()->SizeOfObjects()));
- // Advancing the sweeper step-wise should not change the heap size.
- while (!CcTest::heap()->old_pointer_space()->IsLazySweepingComplete()) {
- CcTest::heap()->old_pointer_space()->AdvanceSweeper(KB);
- CHECK_EQ(initial_size, static_cast<int>(CcTest::heap()->SizeOfObjects()));
+ // Waiting for sweeper threads should not change heap size.
+ if (collector->IsConcurrentSweepingInProgress()) {
+ collector->WaitUntilSweepingCompleted();
}
+ CHECK_EQ(initial_size, static_cast<int>(CcTest::heap()->SizeOfObjects()));
}
@@ -4199,11 +4203,8 @@ TEST(Regress357137) {
}
-TEST(ArrayShiftLazySweeping) {
+TEST(ArrayShiftSweeping) {
i::FLAG_expose_gc = true;
- i::FLAG_parallel_sweeping = false;
- i::FLAG_concurrent_sweeping = false;
- i::FLAG_lazy_sweeping = true;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
« no previous file with comments | « src/store-buffer.cc ('k') | test/mjsunit/regress/regress-1708.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698