Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(623)

Unified Diff: src/heap/gc-idle-time-handler.cc

Issue 500483002: Revert "Add finalize sweeping event to GCIdleTimeHandler." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..90f916e2f45a025b056eee843de8d6de4556d7c2 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(
@@ -29,7 +30,8 @@ size_t GCIdleTimeHandler::EstimateMarkingStepSize(
if (marking_step_size > kMaximumMarkingStepSize)
return kMaximumMarkingStepSize;
- return static_cast<size_t>(marking_step_size * kConservativeTimeRatio);
+ return static_cast<size_t>(marking_step_size *
+ GCIdleTimeHandler::kConservativeTimeRatio);
}
@@ -43,7 +45,7 @@ size_t GCIdleTimeHandler::EstimateMarkCompactTime(
}
-GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms,
+GCIdleTimeAction GCIdleTimeHandler::Compute(int idle_time_in_ms,
HeapState heap_state,
GCTracer* gc_tracer) {
if (IsIdleRoundFinished()) {
@@ -56,8 +58,8 @@ 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 >= static_cast<int>(EstimateMarkCompactTime(
+ heap_state.size_of_objects, speed))) {
// 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.
@@ -74,12 +76,6 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms,
return GCIdleTimeAction::Nothing();
}
}
- // TODO(hpayer): Estimate finalize sweeping time.
- if (heap_state.sweeping_in_progress &&
- idle_time_in_ms >= kMinTimeForFinalizeSweeping) {
- return GCIdleTimeAction::FinalizeSweeping();
- }
-
intptr_t speed = gc_tracer->IncrementalMarkingSpeedInBytesPerMillisecond();
size_t step_size =
static_cast<size_t>(EstimateMarkingStepSize(idle_time_in_ms, speed));
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698