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

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

Issue 563573002: Do full GC for small heaps in idle time handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | 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 8def9005e647b344685050b96c19bac4fa1e3e98..311e39d39c7e8d3080dc55a6f9e161b423525c44 100644
--- a/src/heap/gc-idle-time-handler.cc
+++ b/src/heap/gc-idle-time-handler.cc
@@ -78,9 +78,12 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms,
}
}
if (heap_state.incremental_marking_stopped) {
+ const size_t kSmallHeap = 2 * kPointerSize * MB;
Hannes Payer (out of office) 2014/09/11 09:21:59 please move this constant to the header file.
if (idle_time_in_ms >= EstimateMarkCompactTime(
heap_state.size_of_objects,
- heap_state.mark_compact_speed_in_bytes_per_ms)) {
+ heap_state.mark_compact_speed_in_bytes_per_ms) ||
+ (heap_state.size_of_objects < kSmallHeap &&
+ heap_state.contexts_disposed > 0)) {
// 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698