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

Unified Diff: src/heap/store-buffer-inl.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/store-buffer-inl.h
diff --git a/src/heap/store-buffer-inl.h b/src/heap/store-buffer-inl.h
index e11ad87087ccf039b6076a76d3a408a66a85d6fa..6a2262efa08ff8043077603d9f92628a503611f1 100644
--- a/src/heap/store-buffer-inl.h
+++ b/src/heap/store-buffer-inl.h
@@ -28,6 +28,7 @@ void StoreBuffer::Mark(Address addr) {
inline void StoreBuffer::MarkSynchronized(Address addr) {
base::LockGuard<base::Mutex> lock_guard(&mutex_);
+ if (MemoryChunk::FromAddress(addr)->scan_on_scavenge()) return;
Mark(addr);
}
@@ -48,6 +49,24 @@ void StoreBuffer::EnterDirectlyIntoStoreBuffer(Address addr) {
}
}
}
+
+
+void LocalStoreBuffer::Record(Address addr) {
+ if (top_->is_full()) top_ = new Node(top_);
+ top_->buffer[top_->count++] = addr;
+}
+
+
+void LocalStoreBuffer::Process(StoreBuffer* store_buffer) {
+ Node* current = top_;
+ while (current != nullptr) {
+ for (int i = 0; i < current->count; i++) {
+ store_buffer->Mark(current->buffer[i]);
+ }
+ current = current->next;
+ }
+}
+
} // namespace internal
} // namespace v8
« src/heap/mark-compact.cc ('K') | « src/heap/store-buffer.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698