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

Unified Diff: src/heap/heap.cc

Issue 2453673003: [heap] Concurrent store buffer processing. (Closed)
Patch Set: remove check Created 4 years, 2 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 | « no previous file | src/heap/store-buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 104175ddacbd172724fc30bcb676be8375b2bd06..fd174e7432039033f00d670dd19daa6e8c7d6c88 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -440,7 +440,7 @@ void Heap::GarbageCollectionPrologue() {
}
CheckNewSpaceExpansionCriteria();
UpdateNewSpaceAllocationCounter();
- store_buffer()->MoveEntriesToRememberedSet();
+ store_buffer()->MoveAllEntriesToRememberedSet();
}
@@ -5906,11 +5906,15 @@ void Heap::CheckHandleCount() {
void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) {
if (!InNewSpace(object)) {
- store_buffer()->MoveEntriesToRememberedSet();
Address slot_addr = reinterpret_cast<Address>(slot);
Page* page = Page::FromAddress(slot_addr);
DCHECK_EQ(page->owner()->identity(), OLD_SPACE);
- RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr);
+ if (gc_state_ == NOT_IN_GC) {
+ store_buffer()->DeleteEntry(slot_addr);
+ } else {
+ DCHECK(store_buffer()->Empty());
+ RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr);
+ }
RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr);
}
}
@@ -5918,10 +5922,14 @@ void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) {
void Heap::ClearRecordedSlotRange(Address start, Address end) {
Page* page = Page::FromAddress(start);
if (!page->InNewSpace()) {
- store_buffer()->MoveEntriesToRememberedSet();
DCHECK_EQ(page->owner()->identity(), OLD_SPACE);
- RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end,
- SlotSet::PREFREE_EMPTY_BUCKETS);
+ if (gc_state_ == NOT_IN_GC) {
+ store_buffer()->DeleteEntry(start, end);
+ } else {
+ DCHECK(store_buffer()->Empty());
+ RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end,
+ SlotSet::PREFREE_EMPTY_BUCKETS);
+ }
RememberedSet<OLD_TO_OLD>::RemoveRange(page, start, end,
SlotSet::FREE_EMPTY_BUCKETS);
}
« no previous file with comments | « no previous file | src/heap/store-buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698