case DO_INCREMENTAL_MARKING:
PrintF("incremental marking with step %" V8_PTR_PREFIX "d / ms",
parameter);
+ if (additional_work) {
+ PrintF("; finalized marking");
+ }
break;
case DO_SCAVENGE:
PrintF("scavenge");
GCIdleTimeAction result;
result.type = DONE;
result.parameter = 0;
+ result.additional_work = false;
return result;
}
GCIdleTimeAction result;
result.type = DO_NOTHING;
result.parameter = 0;
+ result.additional_work = false;
return result;
}
GCIdleTimeAction result;
result.type = DO_INCREMENTAL_MARKING;
result.parameter = step_size;
+ result.additional_work = false;
return result;
}
GCIdleTimeAction result;
result.type = DO_SCAVENGE;
result.parameter = 0;
+ result.additional_work = false;
return result;
}
GCIdleTimeAction result;
result.type = DO_FULL_GC;
result.parameter = 0;
+ result.additional_work = false;
return result;
}
GCIdleTimeAction result;
result.type = DO_FINALIZE_SWEEPING;
result.parameter = 0;
+ result.additional_work = false;
return result;
}
GCIdleTimeActionType type;
intptr_t parameter;
+ bool additional_work;
};
}
-void Heap::TryFinalizeIdleIncrementalMarking(
+bool Heap::TryFinalizeIdleIncrementalMarking(
double idle_time_in_ms, size_t size_of_objects,
size_t final_incremental_mark_compact_speed_in_bytes_per_ms) {
if (incremental_marking()->IsComplete() ||
static_cast<size_t>(idle_time_in_ms), size_of_objects,
final_incremental_mark_compact_speed_in_bytes_per_ms))) {
CollectAllGarbage(kNoGCFlags, "idle notification: finalize incremental");
+ return true;
}
+ return false;
}
!incremental_marking()->IsComplete() &&
!mark_compact_collector_.marking_deque()->IsEmpty());
if (remaining_idle_time_in_ms > 0.0) {
- TryFinalizeIdleIncrementalMarking(
+ action.additional_work = TryFinalizeIdleIncrementalMarking(
remaining_idle_time_in_ms, heap_state.size_of_objects,
heap_state.final_incremental_mark_compact_speed_in_bytes_per_ms);
}
void IdleMarkCompact(const char* message);
- void TryFinalizeIdleIncrementalMarking(
+ bool TryFinalizeIdleIncrementalMarking(
double idle_time_in_ms, size_t size_of_objects,
size_t mark_compact_speed_in_bytes_per_ms);