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

Unified Diff: src/heap/heap.cc

Issue 479693004: 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index f3f539d78153c120a75ac43478f9766f5d6c0ff4..a29b767c41a5b7ded1f26a78fd62fe49d291e345 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4296,6 +4296,8 @@ bool Heap::IdleNotification(int idle_time_in_ms) {
heap_state.incremental_marking_stopped = incremental_marking()->IsStopped();
// TODO(ulan): Start incremental marking only for large heaps.
heap_state.can_start_incremental_marking = true;
+ heap_state.sweeping_in_progress =
+ mark_compact_collector()->sweeping_in_progress();
GCIdleTimeAction action =
gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state, tracer());
@@ -4321,18 +4323,12 @@ bool Heap::IdleNotification(int idle_time_in_ms) {
case DO_SCAVENGE:
CollectGarbage(NEW_SPACE, "idle notification: scavenge");
break;
+ case DO_FINALIZE_SWEEPING:
+ mark_compact_collector()->EnsureSweepingCompleted();
case DO_NOTHING:
result = true;
break;
}
- // If the IdleNotifcation is called with a large hint we will wait for
- // the sweepter threads here.
- // TODO(ulan): move this in GCIdleTimeHandler.
- const int kMinHintForFullGC = 100;
- if (idle_time_in_ms >= kMinHintForFullGC &&
- mark_compact_collector()->sweeping_in_progress()) {
- mark_compact_collector()->EnsureSweepingCompleted();
- }
return result;
}
« no previous file with comments | « src/heap/gc-idle-time-handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698