| Index: src/incremental-marking.cc
|
| diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
|
| index 8e2eb62357664d39f378530af1408e0f6202b9b9..4afc8bcf2123b9bbc69b93a60b0f90c2b1b50e8b 100644
|
| --- a/src/incremental-marking.cc
|
| +++ b/src/incremental-marking.cc
|
| @@ -21,13 +21,8 @@ IncrementalMarking::IncrementalMarking(Heap* heap)
|
| state_(STOPPED),
|
| marking_deque_memory_(NULL),
|
| marking_deque_memory_committed_(false),
|
| - steps_count_(0),
|
| - steps_took_(0),
|
| - longest_step_(0.0),
|
| old_generation_space_available_at_start_of_incremental_(0),
|
| old_generation_space_used_at_start_of_incremental_(0),
|
| - steps_count_since_last_gc_(0),
|
| - steps_took_since_last_gc_(0),
|
| should_hurry_(false),
|
| marking_speed_(0),
|
| allocated_(0),
|
| @@ -660,9 +655,7 @@ void IncrementalMarking::UpdateMarkingDequeAfterScavenge() {
|
| }
|
| marking_deque_.set_top(new_top);
|
|
|
| - steps_took_since_last_gc_ = 0;
|
| - steps_count_since_last_gc_ = 0;
|
| - longest_step_ = 0.0;
|
| + heap_->tracer()->reset_step_counters(false);
|
| }
|
|
|
|
|
| @@ -896,12 +889,10 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,
|
| if (marking_deque_.IsEmpty()) MarkingComplete(action);
|
| }
|
|
|
| - steps_count_++;
|
| - steps_count_since_last_gc_++;
|
| -
|
| bool speed_up = false;
|
|
|
| - if ((steps_count_ % kMarkingSpeedAccellerationInterval) == 0) {
|
| + int steps_count = heap_->tracer()->steps_count();
|
| + if (((steps_count + 1) % kMarkingSpeedAccellerationInterval) == 0) {
|
| if (FLAG_trace_gc) {
|
| PrintPID("Speed up marking after %d steps\n",
|
| static_cast<int>(kMarkingSpeedAccellerationInterval));
|
| @@ -966,24 +957,18 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,
|
| FLAG_print_cumulative_gc_stat) {
|
| double end = base::OS::TimeCurrentMillis();
|
| double delta = (end - start);
|
| - longest_step_ = Max(longest_step_, delta);
|
| - steps_took_ += delta;
|
| - steps_took_since_last_gc_ += delta;
|
| + heap_->tracer()->add_step(delta);
|
| heap_->AddMarkingTime(delta);
|
| }
|
| }
|
|
|
|
|
| void IncrementalMarking::ResetStepCounters() {
|
| - steps_count_ = 0;
|
| - steps_took_ = 0;
|
| - longest_step_ = 0.0;
|
| + heap_->tracer()->reset_step_counters(true);
|
| old_generation_space_available_at_start_of_incremental_ =
|
| SpaceLeftInOldSpace();
|
| old_generation_space_used_at_start_of_incremental_ =
|
| heap_->PromotedTotalSize();
|
| - steps_count_since_last_gc_ = 0;
|
| - steps_took_since_last_gc_ = 0;
|
| bytes_rescanned_ = 0;
|
| marking_speed_ = kInitialMarkingSpeed;
|
| bytes_scanned_ = 0;
|
|
|