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

Unified Diff: src/heap/store-buffer.cc

Issue 2548213004: [heap] Use callbacks to dispatch store buffer operations. (Closed)
Patch Set: restructure Created 4 years 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
« src/heap/store-buffer.h ('K') | « src/heap/store-buffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/store-buffer.cc
diff --git a/src/heap/store-buffer.cc b/src/heap/store-buffer.cc
index abf6da409e1906cb5b95ef902678b5ffdcf27611..2e5f720c9f78f4c312f56736b0e6e30ab6a56c64 100644
--- a/src/heap/store-buffer.cc
+++ b/src/heap/store-buffer.cc
@@ -23,6 +23,8 @@ StoreBuffer::StoreBuffer(Heap* heap)
lazy_top_[i] = nullptr;
}
task_running_ = false;
+ insertion_callback = &InsertDuringRuntime;
+ deletion_callback = &DeleteDuringRuntime;
}
void StoreBuffer::SetUp() {
@@ -137,29 +139,5 @@ void StoreBuffer::ConcurrentlyProcessStoreBuffer() {
task_running_ = false;
}
-void StoreBuffer::DeleteEntry(Address start, Address end) {
- // Deletions coming from the GC are directly deleted from the remembered
- // set. Deletions coming from the runtime are added to the store buffer
- // to allow concurrent processing.
- if (heap_->gc_state() == Heap::NOT_IN_GC) {
- if (top_ + sizeof(Address) * 2 > limit_[current_]) {
- StoreBufferOverflow(heap_->isolate());
- }
- *top_ = MarkDeletionAddress(start);
- top_++;
- *top_ = end;
- top_++;
- } else {
- // In GC the store buffer has to be empty at any time.
- DCHECK(Empty());
- Page* page = Page::FromAddress(start);
- if (end) {
- RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end,
- SlotSet::PREFREE_EMPTY_BUCKETS);
- } else {
- RememberedSet<OLD_TO_NEW>::Remove(page, start);
- }
- }
-}
} // namespace internal
} // namespace v8
« src/heap/store-buffer.h ('K') | « src/heap/store-buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698