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

Unified Diff: src/mark-compact.h

Issue 2274001: Revert r4715. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 7 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/ia32/stub-cache-ia32.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.h
===================================================================
--- src/mark-compact.h (revision 4722)
+++ src/mark-compact.h (working copy)
@@ -41,8 +41,7 @@
// no attempt to add area to free list is made.
typedef void (*DeallocateFunction)(Address start,
int size_in_bytes,
- bool add_to_freelist,
- bool last_on_page);
+ bool add_to_freelist);
// Forward declarations.
@@ -132,7 +131,8 @@
SWEEP_SPACES,
ENCODE_FORWARDING_ADDRESSES,
UPDATE_POINTERS,
- RELOCATE_OBJECTS
+ RELOCATE_OBJECTS,
+ REBUILD_RSETS
};
// The current stage of the collector.
@@ -269,22 +269,22 @@
// written to their map word's offset in the inactive
// semispace.
//
- // Bookkeeping data is written to the page header of
+ // Bookkeeping data is written to the remembered-set are of
// eached paged-space page that contains live objects after
// compaction:
//
- // The allocation watermark field is used to track the
- // relocation top address, the address of the first word
- // after the end of the last live object in the page after
- // compaction.
+ // The 3rd word of the page (first word of the remembered
+ // set) contains the relocation top address, the address of
+ // the first word after the end of the last live object in
+ // the page after compaction.
//
- // The Page::mc_page_index field contains the zero-based index of the
- // page in its space. This word is only used for map space pages, in
+ // The 4th word contains the zero-based index of the page in
+ // its space. This word is only used for map space pages, in
// order to encode the map addresses in 21 bits to free 11
// bits per map word for the forwarding address.
//
- // The Page::mc_first_forwarded field contains the (nonencoded)
- // forwarding address of the first live object in the page.
+ // The 5th word contains the (nonencoded) forwarding address
+ // of the first live object in the page.
//
// In both the new space and the paged spaces, a linked list
// of live regions is constructructed (linked through
@@ -319,28 +319,23 @@
// generation.
static void DeallocateOldPointerBlock(Address start,
int size_in_bytes,
- bool add_to_freelist,
- bool last_on_page);
+ bool add_to_freelist);
static void DeallocateOldDataBlock(Address start,
int size_in_bytes,
- bool add_to_freelist,
- bool last_on_page);
+ bool add_to_freelist);
static void DeallocateCodeBlock(Address start,
int size_in_bytes,
- bool add_to_freelist,
- bool last_on_page);
+ bool add_to_freelist);
static void DeallocateMapBlock(Address start,
int size_in_bytes,
- bool add_to_freelist,
- bool last_on_page);
+ bool add_to_freelist);
static void DeallocateCellBlock(Address start,
int size_in_bytes,
- bool add_to_freelist,
- bool last_on_page);
+ bool add_to_freelist);
// If we are not compacting the heap, we simply sweep the spaces except
// for the large object space, clearing mark bits and adding unmarked
@@ -354,7 +349,9 @@
//
// After: All pointers in live objects, including encoded map
// pointers, are updated to point to their target's new
- // location.
+ // location. The remembered set area of each paged-space
+ // page containing live objects still contains bookkeeping
+ // information.
friend class UpdatingVisitor; // helper for updating visited objects
@@ -376,9 +373,13 @@
// Phase 4: Relocating objects.
//
// Before: Pointers to live objects are updated to point to their
- // target's new location.
+ // target's new location. The remembered set area of each
+ // paged-space page containing live objects still contains
+ // bookkeeping information.
//
- // After: Objects have been moved to their new addresses.
+ // After: Objects have been moved to their new addresses. The
+ // remembered set area of each paged-space page containing
+ // live objects still contains bookkeeping information.
// Relocates objects in all spaces.
static void RelocateObjects();
@@ -407,6 +408,17 @@
// Copy a new object.
static int RelocateNewObject(HeapObject* obj);
+ // -----------------------------------------------------------------------
+ // Phase 5: Rebuilding remembered sets.
+ //
+ // Before: The heap is in a normal state except that remembered sets
+ // in the paged spaces are not correct.
+ //
+ // After: The heap is in a normal state.
+
+ // Rebuild remembered set in old and map spaces.
+ static void RebuildRSets();
+
#ifdef DEBUG
// -----------------------------------------------------------------------
// Debugging variables, functions and classes
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698