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

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

Issue 494203002: Revert "Start incremental marking in idle time handler only if it is worthwhile." (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.h » ('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 90f916e2f45a025b056eee843de8d6de4556d7c2..a2e08b28c514e1c08c0c394a9100c8da6150897d 100644
--- a/src/heap/gc-idle-time-handler.cc
+++ b/src/heap/gc-idle-time-handler.cc
@@ -46,20 +46,22 @@ size_t GCIdleTimeHandler::EstimateMarkCompactTime(
GCIdleTimeAction GCIdleTimeHandler::Compute(int idle_time_in_ms,
- HeapState heap_state,
+ int contexts_disposed,
+ size_t size_of_objects,
+ bool incremental_marking_stopped,
GCTracer* gc_tracer) {
if (IsIdleRoundFinished()) {
- if (EnoughGarbageSinceLastIdleRound() || heap_state.contexts_disposed > 0) {
+ if (EnoughGarbageSinceLastIdleRound() || contexts_disposed > 0) {
StartIdleRound();
} else {
return GCIdleTimeAction::Nothing();
}
}
- if (heap_state.incremental_marking_stopped) {
+ if (incremental_marking_stopped) {
size_t speed =
static_cast<size_t>(gc_tracer->MarkCompactSpeedInBytesPerMillisecond());
- if (idle_time_in_ms >= static_cast<int>(EstimateMarkCompactTime(
- heap_state.size_of_objects, speed))) {
+ if (idle_time_in_ms >=
+ static_cast<int>(EstimateMarkCompactTime(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.
@@ -67,14 +69,10 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(int idle_time_in_ms,
// can get rid of this special case and always start incremental marking.
int remaining_mark_sweeps =
kMaxMarkCompactsInIdleRound - mark_compacts_since_idle_round_started_;
- if (heap_state.contexts_disposed > 0 || remaining_mark_sweeps <= 2 ||
- !heap_state.can_start_incremental_marking) {
+ if (contexts_disposed > 0 || remaining_mark_sweeps <= 2) {
return GCIdleTimeAction::FullGC();
}
}
- if (!heap_state.can_start_incremental_marking) {
- return GCIdleTimeAction::Nothing();
- }
}
intptr_t speed = gc_tracer->IncrementalMarkingSpeedInBytesPerMillisecond();
size_t step_size =
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698