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); |