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

Unified Diff: src/heap/mark-compact.h

Issue 1577853007: [heap] Parallel newspace evacuation, semispace copy, and compaction \o/ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Refactoring Created 4 years, 11 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
Index: src/heap/mark-compact.h
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
index cfb2d9d27022f033341acce33c68212faa8ac31a..1c233ea5d8ef56ed35b597df3107d62a022afbe4 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -406,7 +406,8 @@ class MarkCompactCollector {
void MigrateObject(HeapObject* dst, HeapObject* src, int size,
AllocationSpace to_old_space,
- SlotsBuffer** evacuation_slots_buffer);
+ SlotsBuffer** evacuation_slots_buffer,
+ LocalStoreBuffer* local_store_buffer);
void InvalidateCode(Code* code);
@@ -421,7 +422,8 @@ class MarkCompactCollector {
// required_freed_bytes was freed. If required_freed_bytes was set to zero
// then the whole given space is swept. It returns the size of the maximum
// continuous freed memory chunk.
- int SweepInParallel(PagedSpace* space, int required_freed_bytes);
+ int SweepInParallel(PagedSpace* space, int required_freed_bytes,
+ int max_pages = 0);
Hannes Payer (out of office) 2016/01/20 13:19:39 Please remove the sweeper change from the CL. This
Michael Lippautz 2016/01/21 10:00:08 Done.
// Sweeps a given page concurrently to the sweeper threads. It returns the
// size of the maximum continuous freed memory chunk.
@@ -508,11 +510,10 @@ class MarkCompactCollector {
class EvacuateNewSpaceVisitor;
class EvacuateOldSpaceVisitor;
class EvacuateVisitorBase;
+ class Evacuator;
class HeapObjectVisitor;
class SweeperTask;
- static const int kInitialLocalPretenuringFeedbackCapacity = 256;
-
explicit MarkCompactCollector(Heap* heap);
bool WillBeDeoptimized(Code* code);
@@ -699,25 +700,18 @@ class MarkCompactCollector {
void SweepSpaces();
void EvacuateNewSpacePrologue();
-
- // Returns local pretenuring feedback.
- HashMap* EvacuateNewSpaceInParallel();
+ void EvacuateNewSpaceEpilogue();
void AddEvacuationSlotsBufferSynchronized(
SlotsBuffer* evacuation_slots_buffer);
- void EvacuatePages(CompactionSpaceCollection* compaction_spaces,
- SlotsBuffer** evacuation_slots_buffer);
-
void EvacuatePagesInParallel();
// The number of parallel compaction tasks, including the main thread.
- int NumberOfParallelCompactionTasks();
+ int NumberOfParallelCompactionTasks(int pages, intptr_t live_bytes);
-
- void StartParallelCompaction(CompactionSpaceCollection** compaction_spaces,
- uint32_t* task_ids, int len);
- void WaitUntilCompactionCompleted(uint32_t* task_ids, int len);
+ void StartParallelCompaction(Evacuator** evacuators, int len);
+ void WaitUntilCompactionCompleted(Evacuator** evacuators, int len);
void EvacuateNewSpaceAndCandidates();
@@ -752,7 +746,8 @@ class MarkCompactCollector {
// Updates store buffer and slot buffer for a pointer in a migrating object.
void RecordMigratedSlot(Object* value, Address slot,
- SlotsBuffer** evacuation_slots_buffer);
+ SlotsBuffer** evacuation_slots_buffer,
+ LocalStoreBuffer* local_store_buffer);
// Adds the code entry slot to the slots buffer.
void RecordMigratedCodeEntrySlot(Address code_entry, Address code_entry_slot,
@@ -778,8 +773,7 @@ class MarkCompactCollector {
bool have_code_to_deoptimize_;
List<Page*> evacuation_candidates_;
-
- List<MemoryChunk*> newspace_evacuation_candidates_;
+ List<NewSpacePage*> newspace_evacuation_candidates_;
// The evacuation_slots_buffers_ are used by the compaction threads.
// When a compaction task finishes, it uses

Powered by Google App Engine
This is Rietveld 408576698