Commit e79e2f5f authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Add flag for experimenting with the number of marking tasks.

This adds --gc-experiment-reduce-concurrent-marking-tasks to be used
in a Finch experiment.

Bug: v8:10442
Change-Id: Ie2adf4faa20c99d1793907dfc6857497743f8d5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280093Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68673}
parent 66fc9431
...@@ -1067,6 +1067,8 @@ DEFINE_BOOL(gc_experiment_background_schedule, false, ...@@ -1067,6 +1067,8 @@ DEFINE_BOOL(gc_experiment_background_schedule, false,
"new background GC schedule heuristics") "new background GC schedule heuristics")
DEFINE_BOOL(gc_experiment_less_compaction, false, DEFINE_BOOL(gc_experiment_less_compaction, false,
"less compaction in non-memory reducing mode") "less compaction in non-memory reducing mode")
DEFINE_BOOL(gc_experiment_reduce_concurrent_marking_tasks, false,
"reduce the number of concurrent marking tasks")
DEFINE_BOOL(disable_abortjs, false, "disables AbortJS runtime function") DEFINE_BOOL(disable_abortjs, false, "disables AbortJS runtime function")
......
...@@ -527,6 +527,10 @@ void ConcurrentMarking::ScheduleTasks() { ...@@ -527,6 +527,10 @@ void ConcurrentMarking::ScheduleTasks() {
// thread. // thread.
total_task_count_ = Max(1, Min(kMaxTasks, num_cores - 2)); total_task_count_ = Max(1, Min(kMaxTasks, num_cores - 2));
#endif // defined(OS_MACOSX) #endif // defined(OS_MACOSX)
if (FLAG_gc_experiment_reduce_concurrent_marking_tasks) {
// Use at most half of the cores in the experiment.
total_task_count_ = Max(1, Min(kMaxTasks, (num_cores / 2) - 1));
}
DCHECK_LE(total_task_count_, kMaxTasks); DCHECK_LE(total_task_count_, kMaxTasks);
// One task is for the main thread. // One task is for the main thread.
STATIC_ASSERT(kMaxTasks + 1 <= MarkingWorklist::kMaxNumTasks); STATIC_ASSERT(kMaxTasks + 1 <= 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