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

Unified Diff: runtime/vm/scavenger.cc

Issue 503363005: - Add and enable concurrent sweeper. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/scavenger.cc
===================================================================
--- runtime/vm/scavenger.cc (revision 39573)
+++ runtime/vm/scavenger.cc (working copy)
@@ -52,10 +52,10 @@
}
-static inline void ForwardTo(uword orignal, uword target) {
+static inline void ForwardTo(uword original, uword target) {
// Make sure forwarding can be encoded.
ASSERT((target & kForwardingMask) == 0);
- *reinterpret_cast<uword*>(orignal) = target | kForwarded;
+ *reinterpret_cast<uword*>(original) = target | kForwarded;
}
@@ -482,8 +482,17 @@
}
#if defined(DEBUG)
- VerifyStoreBufferPointerVisitor verify_store_buffer_visitor(isolate, to_);
- heap_->IterateOldPointers(&verify_store_buffer_visitor);
+ // We can only safely verify the store buffers from old space if there is no
+ // concurrent old space task. At the same time we prevent new tasks from
+ // being spawned.
+ {
+ PageSpace* page_space = heap_->old_space();
+ MonitorLocker ml(page_space->tasks_lock());
+ if (page_space->tasks() == 0) {
+ VerifyStoreBufferPointerVisitor verify_store_buffer_visitor(isolate, to_);
+ heap_->IterateOldPointers(&verify_store_buffer_visitor);
+ }
+ }
#endif // defined(DEBUG)
from_->Delete();
from_ = NULL;
« runtime/vm/heap.cc ('K') | « runtime/vm/raw_object.cc ('k') | runtime/vm/store_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698