| Index: runtime/vm/thread.cc
|
| diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
|
| index ceba83f06b9858c6f0a2d7a69d3a68b3dc0a505d..313de2d1e467ed39ef2f7581e4a8876eda1efce9 100644
|
| --- a/runtime/vm/thread.cc
|
| +++ b/runtime/vm/thread.cc
|
| @@ -255,8 +255,8 @@ void Thread::ExitIsolateAsHelper(bool bypass_safepoint) {
|
| // TODO(koda): Make non-static and invoke in SafepointThreads.
|
| void Thread::PrepareForGC() {
|
| Thread* thread = Thread::Current();
|
| - const bool kDoNotCheckThreshold = false; // Prevent scheduling another GC.
|
| - thread->StoreBufferRelease(kDoNotCheckThreshold);
|
| + // Prevent scheduling another GC.
|
| + thread->StoreBufferRelease(StoreBuffer::kIgnoreThreshold);
|
| // Make sure to get an *empty* block; the isolate needs all entries
|
| // at GC time.
|
| // TODO(koda): Replace with an epilogue (PrepareAfterGC) that acquires.
|
| @@ -265,8 +265,8 @@ void Thread::PrepareForGC() {
|
| }
|
|
|
|
|
| -void Thread::StoreBufferBlockProcess(bool check_threshold) {
|
| - StoreBufferRelease(check_threshold);
|
| +void Thread::StoreBufferBlockProcess(StoreBuffer::ThresholdPolicy policy) {
|
| + StoreBufferRelease(policy);
|
| StoreBufferAcquire();
|
| }
|
|
|
| @@ -274,7 +274,7 @@ void Thread::StoreBufferBlockProcess(bool check_threshold) {
|
| void Thread::StoreBufferAddObject(RawObject* obj) {
|
| store_buffer_block_->Push(obj);
|
| if (store_buffer_block_->IsFull()) {
|
| - StoreBufferBlockProcess(true);
|
| + StoreBufferBlockProcess(StoreBuffer::kCheckThreshold);
|
| }
|
| }
|
|
|
| @@ -282,15 +282,15 @@ void Thread::StoreBufferAddObject(RawObject* obj) {
|
| void Thread::StoreBufferAddObjectGC(RawObject* obj) {
|
| store_buffer_block_->Push(obj);
|
| if (store_buffer_block_->IsFull()) {
|
| - StoreBufferBlockProcess(false);
|
| + StoreBufferBlockProcess(StoreBuffer::kIgnoreThreshold);
|
| }
|
| }
|
|
|
|
|
| -void Thread::StoreBufferRelease(bool check_threshold) {
|
| +void Thread::StoreBufferRelease(StoreBuffer::ThresholdPolicy policy) {
|
| StoreBufferBlock* block = store_buffer_block_;
|
| store_buffer_block_ = NULL;
|
| - isolate_->store_buffer()->PushBlock(block, check_threshold);
|
| + isolate_->store_buffer()->PushBlock(block, policy);
|
| }
|
|
|
|
|
|
|