| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "src/heap/incremental-marking.h" | 5 #include "src/heap/incremental-marking.h" | 
| 6 | 6 | 
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" | 
| 8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" | 
| 9 #include "src/conversions.h" | 9 #include "src/conversions.h" | 
| 10 #include "src/heap/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" | 
| (...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1038   finalize_marking_completed_ = false; | 1038   finalize_marking_completed_ = false; | 
| 1039   incremental_marking_finalization_rounds_ = 0; | 1039   incremental_marking_finalization_rounds_ = 0; | 
| 1040 } | 1040 } | 
| 1041 | 1041 | 
| 1042 double IncrementalMarking::AdvanceIncrementalMarking( | 1042 double IncrementalMarking::AdvanceIncrementalMarking( | 
| 1043     double deadline_in_ms, IncrementalMarking::StepActions step_actions) { | 1043     double deadline_in_ms, IncrementalMarking::StepActions step_actions) { | 
| 1044   DCHECK(!IsStopped()); | 1044   DCHECK(!IsStopped()); | 
| 1045 | 1045 | 
| 1046   intptr_t step_size_in_bytes = GCIdleTimeHandler::EstimateMarkingStepSize( | 1046   intptr_t step_size_in_bytes = GCIdleTimeHandler::EstimateMarkingStepSize( | 
| 1047       GCIdleTimeHandler::kIncrementalMarkingStepTimeInMs, | 1047       GCIdleTimeHandler::kIncrementalMarkingStepTimeInMs, | 
| 1048       heap() | 1048       heap()->tracer()->IncrementalMarkingSpeedInBytesPerMillisecond()); | 
| 1049           ->tracer() |  | 
| 1050           ->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond()); |  | 
| 1051   double remaining_time_in_ms = 0.0; | 1049   double remaining_time_in_ms = 0.0; | 
| 1052   intptr_t bytes_processed = 0; | 1050   intptr_t bytes_processed = 0; | 
| 1053 | 1051 | 
| 1054   do { | 1052   do { | 
| 1055     bytes_processed = | 1053     bytes_processed = | 
| 1056         Step(step_size_in_bytes, step_actions.completion_action, | 1054         Step(step_size_in_bytes, step_actions.completion_action, | 
| 1057              step_actions.force_marking, step_actions.force_completion); | 1055              step_actions.force_marking, step_actions.force_completion); | 
| 1058     remaining_time_in_ms = | 1056     remaining_time_in_ms = | 
| 1059         deadline_in_ms - heap()->MonotonicallyIncreasingTimeInMs(); | 1057         deadline_in_ms - heap()->MonotonicallyIncreasingTimeInMs(); | 
| 1060   } while (bytes_processed > 0 && | 1058   } while (bytes_processed > 0 && | 
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1294   idle_marking_delay_counter_++; | 1292   idle_marking_delay_counter_++; | 
| 1295 } | 1293 } | 
| 1296 | 1294 | 
| 1297 | 1295 | 
| 1298 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1296 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 
| 1299   idle_marking_delay_counter_ = 0; | 1297   idle_marking_delay_counter_ = 0; | 
| 1300 } | 1298 } | 
| 1301 | 1299 | 
| 1302 }  // namespace internal | 1300 }  // namespace internal | 
| 1303 }  // namespace v8 | 1301 }  // namespace v8 | 
| OLD | NEW | 
|---|