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

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

Issue 754363008: Restart idle round on context disposal. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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') | 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 3a8691db2c197d30e8b3a0b18dd29a05f3ad1834..ff2a559dd539dae2dc3ce3b1c09477243ba6f704 100644
--- a/src/heap/gc-idle-time-handler.cc
+++ b/src/heap/gc-idle-time-handler.cc
@@ -160,8 +160,8 @@ bool GCIdleTimeHandler::ShouldDoMarkCompact(
bool GCIdleTimeHandler::ShouldDoContextDisposalMarkCompact(
- bool context_disposed, double contexts_disposal_rate) {
- return context_disposed && contexts_disposal_rate > 0 &&
+ int contexts_disposed, double contexts_disposal_rate) {
+ return contexts_disposed > 0 && contexts_disposal_rate > 0 &&
contexts_disposal_rate < kHighContextDisposalRate;
}
@@ -196,6 +196,9 @@ bool GCIdleTimeHandler::ShouldDoFinalIncrementalMarkCompact(
GCIdleTimeAction GCIdleTimeHandler::Compute(double idle_time_in_ms,
HeapState heap_state) {
if (static_cast<int>(idle_time_in_ms) <= 0) {
+ if (heap_state.contexts_disposed > 0) {
+ StartIdleRound();
+ }
if (heap_state.incremental_marking_stopped) {
if (ShouldDoContextDisposalMarkCompact(
heap_state.contexts_disposed,
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698