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

Unified Diff: src/store-buffer.h

Issue 18998004: Implemented lazy sweeping of new space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/mark-compact.cc ('k') | src/store-buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/store-buffer.h
diff --git a/src/store-buffer.h b/src/store-buffer.h
index 520cbc01626b698607928dbd83638ba220096fb2..01e7cbeb8d2a439784617f20a16a61793df14459 100644
--- a/src/store-buffer.h
+++ b/src/store-buffer.h
@@ -43,8 +43,10 @@ class StoreBuffer;
typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to);
-typedef void (StoreBuffer::*RegionCallback)(
- Address start, Address end, ObjectSlotCallback slot_callback);
+typedef void (StoreBuffer::*RegionCallback)(Address start,
+ Address end,
+ ObjectSlotCallback slot_callback,
+ bool clear_maps);
// Used to implement the write barrier by collecting addresses of pointers
// between spaces.
@@ -83,6 +85,10 @@ class StoreBuffer {
// surviving old-to-new pointers into the store buffer to rebuild it.
void IteratePointersToNewSpace(ObjectSlotCallback callback);
+ // Same as IteratePointersToNewSpace but additonally clears maps in objects
+ // referenced from the store buffer that do not contain a forwarding pointer.
+ void IteratePointersToNewSpaceAndClearMaps(ObjectSlotCallback callback);
+
static const int kStoreBufferOverflowBit = 1 << (14 + kPointerSizeLog2);
static const int kStoreBufferSize = kStoreBufferOverflowBit;
static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address);
@@ -164,9 +170,15 @@ class StoreBuffer {
void Uniq();
void ExemptPopularPages(int prime_sample_step, int threshold);
+ // Set the map field of the object to NULL if contains a map.
+ inline void ClearDeadObject(HeapObject *object);
+
+ void IteratePointersToNewSpace(ObjectSlotCallback callback, bool clear_maps);
+
void FindPointersToNewSpaceInRegion(Address start,
Address end,
- ObjectSlotCallback slot_callback);
+ ObjectSlotCallback slot_callback,
+ bool clear_maps);
// For each region of pointers on a page in use from an old space call
// visit_pointer_region callback.
@@ -182,20 +194,24 @@ class StoreBuffer {
void FindPointersToNewSpaceInMaps(
Address start,
Address end,
- ObjectSlotCallback slot_callback);
+ ObjectSlotCallback slot_callback,
+ bool clear_maps);
void FindPointersToNewSpaceInMapsRegion(
Address start,
Address end,
- ObjectSlotCallback slot_callback);
+ ObjectSlotCallback slot_callback,
+ bool clear_maps);
void FindPointersToNewSpaceOnPage(
PagedSpace* space,
Page* page,
RegionCallback region_callback,
- ObjectSlotCallback slot_callback);
+ ObjectSlotCallback slot_callback,
+ bool clear_maps);
- void IteratePointersInStoreBuffer(ObjectSlotCallback slot_callback);
+ void IteratePointersInStoreBuffer(ObjectSlotCallback slot_callback,
+ bool clear_maps);
#ifdef VERIFY_HEAP
void VerifyPointers(PagedSpace* space, RegionCallback region_callback);
« no previous file with comments | « src/mark-compact.cc ('k') | src/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698