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

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: Rebase (2 changes factored out) and addressed comments 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..81b62161d64510d260261970bcdf8b5b0b3677ac 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);
// Sweeps a given page concurrently to the sweeper threads. It returns the
// size of the maximum continuous freed memory chunk.
@@ -511,8 +513,6 @@ class MarkCompactCollector {
class HeapObjectVisitor;
class SweeperTask;
- static const int kInitialLocalPretenuringFeedbackCapacity = 256;
-
explicit MarkCompactCollector(Heap* heap);
bool WillBeDeoptimized(Code* code);
@@ -699,20 +699,19 @@ class MarkCompactCollector {
void SweepSpaces();
void EvacuateNewSpacePrologue();
-
- // Returns local pretenuring feedback.
- HashMap* EvacuateNewSpaceInParallel();
+ void EvacuateNewSpaceEpilogue();
void AddEvacuationSlotsBufferSynchronized(
SlotsBuffer* evacuation_slots_buffer);
+ bool EvacuateSinglePage(MemoryChunk* p, HeapObjectVisitor* visitor,
+ CompactionSpaceCollection* compaction_spaces);
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,
@@ -752,7 +751,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 +778,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