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

Unified Diff: runtime/vm/thread.cc

Issue 1350933004: Distinct block sizes for StoreBuffer/MarkingStack. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years, 3 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 | « runtime/vm/thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « runtime/vm/thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698