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

Unified Diff: runtime/vm/gc_marker.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/dart.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/gc_marker.cc
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index 0fa67d7be5664286cf3cfeb4a63ead69c0378a42..0df41177730edde525bf83f910d73ef19df78ccd 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -27,9 +27,6 @@ DEFINE_FLAG(int, marker_tasks, 1,
"The number of tasks to spawn during old gen GC marking (0 means "
"perform all marking on main thread).");
-typedef StoreBufferBlock PointerBlock; // TODO(koda): Rename to PointerBlock.
-typedef StoreBuffer MarkingStack; // TODO(koda): Create shared base class.
-
class DelaySet {
private:
typedef std::multimap<RawObject*, RawWeakProperty*> Map;
@@ -288,11 +285,11 @@ class MarkingVisitor : public ObjectPointerVisitor {
if (work_->IsEmpty()) {
// TODO(koda): Track over/underflow events and use in heuristics to
// distribute work and prevent degenerate flip-flopping.
- PointerBlock* new_work = marking_stack_->PopNonEmptyBlock();
+ MarkingStack::Block* new_work = marking_stack_->PopNonEmptyBlock();
if (new_work == NULL) {
return NULL;
}
- marking_stack_->PushBlock(work_, false);
+ marking_stack_->PushBlock(work_);
work_ = new_work;
}
return work_->Pop();
@@ -302,7 +299,7 @@ class MarkingVisitor : public ObjectPointerVisitor {
if (work_->IsFull()) {
// TODO(koda): Track over/underflow events and use in heuristics to
// distribute work and prevent degenerate flip-flopping.
- marking_stack_->PushBlock(work_, false);
+ marking_stack_->PushBlock(work_);
work_ = marking_stack_->PopEmptyBlock();
}
work_->Push(raw_obj);
@@ -310,14 +307,14 @@ class MarkingVisitor : public ObjectPointerVisitor {
void Finalize() {
ASSERT(work_->IsEmpty());
- marking_stack_->PushBlock(work_, false);
+ marking_stack_->PushBlock(work_);
work_ = NULL;
// Fail fast on attempts to mark after finalizing.
marking_stack_ = NULL;
}
private:
- PointerBlock* work_;
+ MarkingStack::Block* work_;
MarkingStack* marking_stack_;
};
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698