[heap] Make the scavenge task trigger configurable via a runtime flags.

Change-Id: If9252354404efcac89ab8fbbd41250a6311fdfd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2135731
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66985}
This commit is contained in:
Hannes Payer 2020-04-03 15:29:38 +02:00 committed by Commit Bot
parent 6a99e67329
commit 6844179837
2 changed files with 3 additions and 2 deletions

View File

@ -892,6 +892,8 @@ DEFINE_BOOL(incremental_marking_wrappers, true,
DEFINE_BOOL(trace_unmapper, false, "Trace the unmapping")
DEFINE_BOOL(parallel_scavenge, true, "parallel scavenge")
DEFINE_BOOL(scavenge_task, true, "schedule scavenge tasks")
DEFINE_INT(scavenge_task_trigger, 80,
"scavenge task trigger in percent of the current heap limit")
DEFINE_BOOL(trace_parallel_scavenge, false, "trace parallel scavenge")
DEFINE_BOOL(write_protect_code_memory, true, "write protect code memory")
#ifdef V8_CONCURRENT_MARKING

View File

@ -30,8 +30,7 @@ class ScavengeJob::Task : public CancelableTask {
};
size_t ScavengeJob::YoungGenerationTaskTriggerSize(Heap* heap) {
static constexpr double kTaskTriggerFactor = 0.8;
return heap->new_space()->Capacity() * kTaskTriggerFactor;
return heap->new_space()->Capacity() * FLAG_scavenge_task_trigger / 100;
}
bool ScavengeJob::YoungGenerationSizeTaskTriggerReached(Heap* heap) {