| Index: src/heap/gc-idle-time-handler.cc
|
| diff --git a/src/heap/gc-idle-time-handler.cc b/src/heap/gc-idle-time-handler.cc
|
| index e5ed823ce3ced1b1e724a938c71018be326d7c45..816178231e9a902f495b1aa3a931ea636bdda6ba 100644
|
| --- a/src/heap/gc-idle-time-handler.cc
|
| +++ b/src/heap/gc-idle-time-handler.cc
|
| @@ -10,6 +10,7 @@ namespace v8 {
|
| namespace internal {
|
|
|
| const double GCIdleTimeHandler::kConservativeTimeRatio = 0.9;
|
| +const size_t GCIdleTimeHandler::kMaxMarkCompactTimeInMs = 1000000;
|
|
|
|
|
| size_t GCIdleTimeHandler::EstimateMarkingStepSize(
|
| @@ -44,8 +45,7 @@ size_t GCIdleTimeHandler::EstimateMarkCompactTime(
|
|
|
|
|
| GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms,
|
| - HeapState heap_state,
|
| - GCTracer* gc_tracer) {
|
| + HeapState heap_state) {
|
| if (IsIdleRoundFinished()) {
|
| if (EnoughGarbageSinceLastIdleRound() || heap_state.contexts_disposed > 0) {
|
| StartIdleRound();
|
| @@ -54,10 +54,9 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms,
|
| }
|
| }
|
| if (heap_state.incremental_marking_stopped) {
|
| - size_t speed =
|
| - static_cast<size_t>(gc_tracer->MarkCompactSpeedInBytesPerMillisecond());
|
| - if (idle_time_in_ms >=
|
| - EstimateMarkCompactTime(heap_state.size_of_objects, speed)) {
|
| + if (idle_time_in_ms >= EstimateMarkCompactTime(
|
| + heap_state.size_of_objects,
|
| + heap_state.mark_compact_speed_in_bytes_per_ms)) {
|
| // If there are no more than two GCs left in this idle round and we are
|
| // allowed to do a full GC, then make those GCs full in order to compact
|
| // the code space.
|
| @@ -80,9 +79,8 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms,
|
| return GCIdleTimeAction::FinalizeSweeping();
|
| }
|
|
|
| - intptr_t speed = gc_tracer->IncrementalMarkingSpeedInBytesPerMillisecond();
|
| - size_t step_size =
|
| - static_cast<size_t>(EstimateMarkingStepSize(idle_time_in_ms, speed));
|
| + size_t step_size = EstimateMarkingStepSize(
|
| + idle_time_in_ms, heap_state.incremental_marking_speed_in_bytes_per_ms);
|
| return GCIdleTimeAction::IncrementalMarking(step_size);
|
| }
|
| }
|
|
|