Chromium Code Reviews| Index: src/mark-compact.cc |
| =================================================================== |
| --- src/mark-compact.cc (revision 7374) |
| +++ src/mark-compact.cc (working copy) |
| @@ -1726,6 +1726,7 @@ |
| if (Heap::new_space()->Contains(obj)) { |
| ASSERT(Heap::InFromSpace(*p)); |
| *p = HeapObject::FromAddress(Memory::Address_at(old_addr)); |
| + StoreBuffer::EnterDirectlyIntoStoreBuffer(reinterpret_cast<Address>(p)); |
|
Vyacheslav Egorov (Chromium)
2011/03/28 15:13:19
This visitor is used to visit new space objects.
Erik Corry
2011/03/28 15:56:07
Good catch!
|
| } |
| } |
| }; |
| @@ -1846,7 +1847,9 @@ |
| int survivors_size = 0; |
| // First pass: traverse all objects in inactive semispace, remove marks, |
| - // migrate live objects and write forwarding addresses. |
| + // migrate live objects and write forwarding addresses. This stage puts |
| + // new entries in the store buffer and may cause some pages to be marked |
| + // scan-on-scavenge. |
| for (Address current = from_bottom; current < from_top; current += size) { |
| HeapObject* object = HeapObject::FromAddress(current); |
| @@ -1899,7 +1902,7 @@ |
| LiveObjectList::IterateElements(&updating_visitor); |
| { |
| - StoreBufferRebuildScope scope; |
| + StoreBufferRebuildScope scope(&Heap::ScavengeStoreBufferCallback); |
| StoreBuffer::IteratePointersToNewSpace(&UpdatePointerToNewGen); |
| } |
| @@ -2403,10 +2406,6 @@ |
| SweeperType sweeper) { |
| space->set_was_swept_conservatively(sweeper == CONSERVATIVE); |
| - // We don't have a linear allocation area while sweeping. It will be restored |
| - // on the first allocation after the sweep. |
| - space->SetTop(NULL, NULL); |
| - |
| space->ClearStats(); |
| PageIterator it(space); |