Commit 138d9bae authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] Refactor evacuation for young and old gen into visitors.

Create a visitor for evacuating objects for young and old generation. This is
the first step of preparing a task to process, both,  newspace and oldspace
pages in parallel.

BUG=chromium:524425
LOG=N

Review URL: https://codereview.chromium.org/1470253002

Cr-Commit-Position: refs/heads/master@{#32349}
parent b7311811
This diff is collapsed.
......@@ -327,6 +327,15 @@ class ThreadLocalTop;
// Mark-Compact collector
class MarkCompactCollector {
public:
enum IterationMode {
kKeepMarking,
kClearMarkbits,
};
class EvacuateNewSpaceVisitor;
class EvacuateOldSpaceVisitor;
class HeapObjectVisitor;
static void Initialize();
void SetUp();
......@@ -703,14 +712,13 @@ class MarkCompactCollector {
// regions to each space's free list.
void SweepSpaces();
int DiscoverAndEvacuateBlackObjectsOnPage(NewSpace* new_space,
NewSpacePage* p);
// Iterates through all live objects on a page using marking information.
// Returns whether all objects have successfully been visited.
bool IterateLiveObjectsOnPage(MemoryChunk* page, HeapObjectVisitor* visitor,
IterationMode mode);
void EvacuateNewSpace();
bool EvacuateLiveObjectsFromPage(Page* p, PagedSpace* target_space,
SlotsBuffer** evacuation_slots_buffer);
void AddEvacuationSlotsBufferSynchronized(
SlotsBuffer* evacuation_slots_buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment