[baseline] Create flag to use UserBlocking threads for CSP
Since Sparkplug compiles pretty quickly and it might impact loading time, there is an argument that we should actually use high priority threads for CSP. This adds a flag so that we create a finch experiment to test this hypothesis. Change-Id: Ib8965fbea015ddaeb25503bd92873bfff5daa1ce Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3605245 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/main@{#80251}
This commit is contained in:
parent
4b419c0672
commit
a6b8d064cc
@ -193,10 +193,12 @@ class ConcurrentBaselineCompiler {
|
||||
|
||||
explicit ConcurrentBaselineCompiler(Isolate* isolate) : isolate_(isolate) {
|
||||
if (FLAG_concurrent_sparkplug) {
|
||||
TaskPriority priority = FLAG_concurrent_sparkplug_high_priority_threads
|
||||
? TaskPriority::kUserBlocking
|
||||
: TaskPriority::kUserVisible;
|
||||
job_handle_ = V8::GetCurrentPlatform()->PostJob(
|
||||
TaskPriority::kUserVisible,
|
||||
std::make_unique<JobDispatcher>(isolate_, &incoming_queue_,
|
||||
&outgoing_queue_));
|
||||
priority, std::make_unique<JobDispatcher>(isolate_, &incoming_queue_,
|
||||
&outgoing_queue_));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -725,6 +725,8 @@ DEFINE_NEG_IMPLICATION(jitless, concurrent_sparkplug)
|
||||
DEFINE_UINT(
|
||||
concurrent_sparkplug_max_threads, 2,
|
||||
"max number of threads that concurrent Sparkplug can use (0 for unbounded)")
|
||||
DEFINE_BOOL(concurrent_sparkplug_high_priority_threads, false,
|
||||
"use high priority compiler threads for concurrent Sparkplug")
|
||||
#else
|
||||
DEFINE_BOOL(baseline_batch_compilation, false, "batch compile Sparkplug code")
|
||||
DEFINE_BOOL_READONLY(concurrent_sparkplug, false,
|
||||
|
Loading…
Reference in New Issue
Block a user