Reviewers: Michael Starzinger,
Message:
Thanks for the suggestions, true we must not add GC code outside the GC or
the
memory allocator. The decision to start incremental marking fits into
IncrementalMarking::OldSpaceStep.
However, I do not check there for high promotion mode since old space
allocation
should in principle always be able to start incremental marking if needed.
This
should be independent of pretenuring.
Description:
Fix incremental marking speed accelleration and start incremental marking
when
old space is almost full when pretenuring objects.
BUG=
Please review this at https://codereview.chromium.org/14649014/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/incremental-marking.h
M src/incremental-marking.cc
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index
658a34c9cd37e5150a51f5641c5168fe16ed5bf4..65d6a38e2b9ca4ad99d32faa47e1b8e18e94ad3f
100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -860,6 +860,18 @@ void
IncrementalMarking::MarkingComplete(CompletionAction action) {
}
+void IncrementalMarking::OldSpaceStep(intptr_t allocated) {
+ if (IsStopped() &&
+ WorthActivating() &&
+ heap_->NextGCIsLikelyToBeFull()) {
+ Start();
+ } else {
+ Step(allocated * kFastMarking / kInitialMarkingSpeed,
+ GC_VIA_STACK_GUARD);
+ }
+}
+
+
void IncrementalMarking::Step(intptr_t allocated_bytes,
CompletionAction action) {
if (heap_->gc_state() != Heap::NOT_IN_GC ||
@@ -965,7 +977,7 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,
PrintPID("Postponing speeding up marking until marking starts\n");
}
} else {
- marking_speed_ += kMarkingSpeedAccellerationInterval;
+ marking_speed_ += kMarkingSpeedAccelleration;
marking_speed_ = static_cast<int>(
Min(kMaxMarkingSpeed,
static_cast<intptr_t>(marking_speed_ * 1.3)));
Index: src/incremental-marking.h
diff --git a/src/incremental-marking.h b/src/incremental-marking.h
index
fc5a978cc445b6d4627b0aaf5632d700201c3855..7b6927e8738b93e4b0ce89addd40b830a87e918b
100644
--- a/src/incremental-marking.h
+++ b/src/incremental-marking.h
@@ -110,10 +110,7 @@ class IncrementalMarking {
static const intptr_t kMarkingSpeedAccelleration = 2;
static const intptr_t kMaxMarkingSpeed = 1000;
- void OldSpaceStep(intptr_t allocated) {
- Step(allocated * kFastMarking / kInitialMarkingSpeed,
- GC_VIA_STACK_GUARD);
- }
+ void OldSpaceStep(intptr_t allocated);
void Step(intptr_t allocated, CompletionAction action);
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.