Commit 3cf6472c authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

heap: Cap maximum embedder step during incremental marking

V8 is capped by a maximum. Since the embedder step is computed from V8's
speeds using concurrent marking it may be too aggressive. Cap the
embedder step to the same maximum as V8 to workaround that issue.

Bug: chromium:1044630
Change-Id: Idcd84cacf2f3fa4dd8df2a03aa3ae6ffb6cb36a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062393Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66314}
parent f5592da6
......@@ -1104,7 +1104,9 @@ StepResult IncrementalMarking::Step(double max_step_size_in_ms,
: StepResult::kMoreWorkRemaining;
StepResult embedder_result = StepResult::kNoImmediateWork;
if (heap_->local_embedder_heap_tracer()->InUse()) {
embedder_deadline = static_cast<double>(bytes_to_process) / marking_speed;
embedder_deadline =
Max(max_step_size_in_ms,
static_cast<double>(bytes_to_process) / marking_speed);
embedder_result = EmbedderStep(embedder_deadline, &embedder_duration);
}
bytes_marked_ += v8_bytes_processed;
......
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