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

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

Issue 1313313002: Synchronize on concurrent store buffer entries. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « src/heap/mark-compact.cc ('k') | src/heap/store-buffer-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/store-buffer.h
diff --git a/src/heap/store-buffer.h b/src/heap/store-buffer.h
index cb96fa9720a64909fbd1dcf04917f0018f095a08..37a78eb07528b212752828f885bba25d5358933b 100644
--- a/src/heap/store-buffer.h
+++ b/src/heap/store-buffer.h
@@ -33,9 +33,13 @@ class StoreBuffer {
void SetUp();
void TearDown();
- // This is used by the mutator to enter addresses into the store buffer.
+ // This is used to add addresses to the store buffer non-concurrently.
inline void Mark(Address addr);
+ // This is used to add addresses to the store buffer when multiple threads
+ // may operate on the store buffer.
+ inline void MarkSynchronized(Address addr);
+
// This is used by the heap traversal to enter the addresses into the store
// buffer that should still be in the store buffer after GC. It enters
// addresses directly into the old buffer because the GC starts by wiping the
@@ -129,6 +133,9 @@ class StoreBuffer {
uintptr_t* hash_set_2_;
bool hash_sets_are_empty_;
+ // Used for synchronization of concurrent store buffer access.
+ base::Mutex mutex_;
+
void ClearFilteringHashSets();
bool SpaceAvailable(intptr_t space_needed);
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/store-buffer-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698