Commit 1ca94ac9 authored by JianxiaoLuIntel's avatar JianxiaoLuIntel Committed by V8 LUCI CQ

[heap] Fix YoungGenerationMarkingJob with flag "parallel-marking"

Bug: v8:12333
Change-Id: Ic29a9d67b586629148075dccbcebcf6f49398fb8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3235684
Auto-Submit: Jianxiao Lu <jianxiao.lu@intel.com>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77497}
parent 3121b170
......@@ -5223,6 +5223,9 @@ class YoungGenerationMarkingJob : public v8::JobTask {
size_t items = remaining_marking_items_.load(std::memory_order_relaxed);
size_t num_tasks = std::max((items + 1) / kPagesPerTask,
global_worklist_->GlobalPoolSize());
if (!FLAG_parallel_marking) {
num_tasks = std::min<size_t>(1, num_tasks);
}
return std::min<size_t>(
num_tasks, MinorMarkCompactCollector::MarkingWorklist::kMaxNumTasks);
}
......
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