Commit 0adc9cac authored by Dominik Inführ's avatar Dominik Inführ Committed by V8 LUCI CQ

[heap] Add --fast-forward-schedule and disable it for experimenting

Add a flag for disabling FastForwardSchedule() during incremental
marking.

This CL disables "schedule fast forwarding" by default to experiment
with this setup for a few days and to see whether this causes
performance regressions.

Bug: v8:12775
Change-Id: Id2c0a62f4b67b3a2379816581800cfb62361b40c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865003
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82806}
parent 24ee7ed5
......@@ -1259,6 +1259,7 @@ DEFINE_BOOL(incremental_marking_task, true, "use tasks for incremental marking")
DEFINE_INT(incremental_marking_soft_trigger, 0,
"threshold for starting incremental marking via a task in percent "
"of available space: limit - size")
DEFINE_BOOL(fast_forward_schedule, false, "Fast forwards marking schedule")
DEFINE_INT(incremental_marking_hard_trigger, 0,
"threshold for starting incremental marking immediately in percent "
"of available space: limit - size")
......
......@@ -677,6 +677,8 @@ bool IncrementalMarking::TryInitializeTaskTimeout() {
}
void IncrementalMarking::FastForwardSchedule() {
DCHECK(FLAG_fast_forward_schedule);
if (scheduled_bytes_to_mark_ < bytes_marked_) {
scheduled_bytes_to_mark_ = bytes_marked_;
if (FLAG_trace_incremental_marking) {
......@@ -717,7 +719,9 @@ void IncrementalMarking::ScheduleBytesToMarkBasedOnTime(double time_ms) {
void IncrementalMarking::AdvanceAndFinalizeIfComplete() {
ScheduleBytesToMarkBasedOnTime(heap()->MonotonicallyIncreasingTimeInMs());
if (FLAG_fast_forward_schedule) {
FastForwardScheduleIfCloseToFinalization();
}
Step(kStepSizeInMs, StepOrigin::kTask);
heap()->FinalizeIncrementalMarkingIfComplete(
GarbageCollectionReason::kFinalizeMarkingViaTask);
......
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