Commit 74321d55 authored by hpayer's avatar hpayer Committed by Commit bot

Restart idle round on context disposal.

BUG=

Review URL: https://codereview.chromium.org/754363008

Cr-Commit-Position: refs/heads/master@{#25637}
parent 8138bb5b
......@@ -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,
......
......@@ -185,7 +185,7 @@ class GCIdleTimeHandler {
size_t size_of_objects,
size_t mark_compact_speed_in_bytes_per_ms);
static bool ShouldDoContextDisposalMarkCompact(bool context_disposed,
static bool ShouldDoContextDisposalMarkCompact(int context_disposed,
double contexts_disposal_rate);
static bool ShouldDoFinalIncrementalMarkCompact(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment