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

Unified Diff: src/store-buffer.cc

Issue 364063007: Use the HeapObjectIterator to scan-on-scavenge map pages. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/store-buffer.cc
diff --git a/src/store-buffer.cc b/src/store-buffer.cc
index 4ab5c33c8cc439b59033c85c4be1ae5b92c67d49..a21ac2a76ea2d4d2c29ea42b4bf7d9ca4074263c 100644
--- a/src/store-buffer.cc
+++ b/src/store-buffer.cc
@@ -417,49 +417,6 @@ static inline Address MapEndAlign(Address addr) {
}
-void StoreBuffer::FindPointersToNewSpaceInMaps(
- Address start,
- Address end,
- ObjectSlotCallback slot_callback,
- bool clear_maps) {
- ASSERT(MapStartAlign(start) == start);
- ASSERT(MapEndAlign(end) == end);
-
- Address map_address = start;
- while (map_address < end) {
- ASSERT(!heap_->InNewSpace(Memory::Object_at(map_address)));
- ASSERT(Memory::Object_at(map_address)->IsMap());
-
- Address pointer_fields_start = map_address + Map::kPointerFieldsBeginOffset;
- Address pointer_fields_end = map_address + Map::kPointerFieldsEndOffset;
-
- FindPointersToNewSpaceInRegion(pointer_fields_start,
- pointer_fields_end,
- slot_callback,
- clear_maps);
- map_address += Map::kSize;
- }
-}
-
-
-void StoreBuffer::FindPointersToNewSpaceInMapsRegion(
- Address start,
- Address end,
- ObjectSlotCallback slot_callback,
- bool clear_maps) {
- Address map_aligned_start = MapStartAlign(start);
- Address map_aligned_end = MapEndAlign(end);
-
- ASSERT(map_aligned_start == start);
- ASSERT(map_aligned_start <= map_aligned_end && map_aligned_end <= end);
-
- FindPointersToNewSpaceInMaps(map_aligned_start,
- map_aligned_end,
- slot_callback,
- clear_maps);
-}
-
-
void StoreBuffer::IteratePointersInStoreBuffer(
ObjectSlotCallback slot_callback,
bool clear_maps) {
@@ -549,8 +506,18 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback,
Address start = page->area_start();
Address end = page->area_end();
if (owner == heap_->map_space()) {
- FindPointersToNewSpaceInMapsRegion(
- start, end, slot_callback, clear_maps);
+ ASSERT(page->WasSweptPrecisely());
+ HeapObjectIterator iterator(page, NULL);
+ for (HeapObject* heap_object = iterator.Next(); heap_object != NULL;
+ heap_object = iterator.Next()) {
+ // We skip free space objects.
+ if (!heap_object->IsFiller()) {
+ FindPointersToNewSpaceInRegion(
+ heap_object->address() + HeapObject::kHeaderSize,
+ heap_object->address() + heap_object->Size(), slot_callback,
+ clear_maps);
+ }
+ }
} else {
FindPointersToNewSpaceInRegion(
start, end, slot_callback, clear_maps);
« no previous file with comments | « src/store-buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698