| Index: src/incremental-marking.h
|
| diff --git a/src/incremental-marking.h b/src/incremental-marking.h
|
| index 1a86fcd44731d509a510c1ccfd8106eed844882e..528ff37f83177fcd9ce60e8e844ae2a843f864e1 100644
|
| --- a/src/incremental-marking.h
|
| +++ b/src/incremental-marking.h
|
| @@ -95,23 +95,21 @@ class IncrementalMarking {
|
| // progress in the face of the mutator creating new work for it. We start
|
| // of at a moderate rate of work and gradually increase the speed of the
|
| // incremental marker until it completes.
|
| - // Do some marking every time this much memory has been allocated or that many
|
| - // heavy (color-checking) write barriers have been invoked.
|
| + // Do some marking every time this much memory has been allocated.
|
| static const intptr_t kAllocatedThreshold = 65536;
|
| - static const intptr_t kWriteBarriersInvokedThreshold = 65536;
|
| // Start off by marking this many times more memory than has been allocated.
|
| - static const intptr_t kInitialMarkingSpeed = 1;
|
| + static const intptr_t kInitialAllocationMarkingFactor = 1;
|
| // But if we are promoting a lot of data we need to mark faster to keep up
|
| // with the data that is entering the old space through promotion.
|
| static const intptr_t kFastMarking = 3;
|
| // After this many steps we increase the marking/allocating factor.
|
| - static const intptr_t kMarkingSpeedAccellerationInterval = 1024;
|
| + static const intptr_t kAllocationMarkingFactorSpeedupInterval = 1024;
|
| // This is how much we increase the marking/allocating factor by.
|
| - static const intptr_t kMarkingSpeedAccelleration = 2;
|
| - static const intptr_t kMaxMarkingSpeed = 1000;
|
| + static const intptr_t kAllocationMarkingFactorSpeedup = 2;
|
| + static const intptr_t kMaxAllocationMarkingFactor = 1000;
|
|
|
| void OldSpaceStep(intptr_t allocated) {
|
| - Step(allocated * kFastMarking / kInitialMarkingSpeed,
|
| + Step(allocated * kFastMarking / kInitialAllocationMarkingFactor,
|
| GC_VIA_STACK_GUARD);
|
| }
|
|
|
| @@ -138,7 +136,7 @@ class IncrementalMarking {
|
| // guaranteed to be rescanned or not guaranteed to survive.
|
| //
|
| // No slots in white objects should be recorded, as some slots are typed and
|
| - // cannot be interpreted correctly if the underlying object does not survive
|
| + // cannot be interpreted corrrectly if the underlying object does not survive
|
| // the incremental cycle (stays white).
|
| INLINE(bool BaseRecordWrite(HeapObject* obj, Object** slot, Object* value));
|
| INLINE(void RecordWrite(HeapObject* obj, Object** slot, Object* value));
|
| @@ -177,6 +175,16 @@ class IncrementalMarking {
|
| return true;
|
| }
|
|
|
| + // Marks the object grey and pushes it on the marking stack.
|
| + // Returns true if object needed marking and false otherwise.
|
| + // This is for incremental marking only.
|
| + INLINE(bool MarkObjectAndPush(HeapObject* obj));
|
| +
|
| + // Marks the object black without pushing it on the marking stack.
|
| + // Returns true if object needed marking and false otherwise.
|
| + // This is for incremental marking only.
|
| + INLINE(bool MarkObjectWithoutPush(HeapObject* obj));
|
| +
|
| inline int steps_count() {
|
| return steps_count_;
|
| }
|
| @@ -213,13 +221,13 @@ class IncrementalMarking {
|
|
|
| void NotifyOfHighPromotionRate() {
|
| if (IsMarking()) {
|
| - if (marking_speed_ < kFastMarking) {
|
| + if (allocation_marking_factor_ < kFastMarking) {
|
| if (FLAG_trace_gc) {
|
| PrintPID("Increasing marking speed to %d "
|
| "due to high promotion rate\n",
|
| static_cast<int>(kFastMarking));
|
| }
|
| - marking_speed_ = kFastMarking;
|
| + allocation_marking_factor_ = kFastMarking;
|
| }
|
| }
|
| }
|
| @@ -267,6 +275,7 @@ class IncrementalMarking {
|
| VirtualMemory* marking_deque_memory_;
|
| bool marking_deque_memory_committed_;
|
| MarkingDeque marking_deque_;
|
| + Marker<IncrementalMarking> marker_;
|
|
|
| int steps_count_;
|
| double steps_took_;
|
| @@ -277,10 +286,9 @@ class IncrementalMarking {
|
| double steps_took_since_last_gc_;
|
| int64_t bytes_rescanned_;
|
| bool should_hurry_;
|
| - int marking_speed_;
|
| + int allocation_marking_factor_;
|
| intptr_t bytes_scanned_;
|
| intptr_t allocated_;
|
| - intptr_t write_barriers_invoked_since_last_step_;
|
|
|
| int no_marking_scope_depth_;
|
|
|
|
|