From 0999cfb4e840f89dd61ff56d68895f97bb89aa1c Mon Sep 17 00:00:00 2001 From: Fernando Serboncini Date: Mon, 16 Sep 2019 10:49:26 -0400 Subject: [PATCH] Add adjust_os_scheduling_parameters flag for v8 isolate This will allow the test infrastructure to bypass isolate scheduling restrictions. Bug: chromium:1002582 Change-Id: Ib22a599cf6c826c3d412898520dba6f4045175b2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1801995 Reviewed-by: Igor Sheludko Reviewed-by: Ulan Degenbaev Commit-Queue: Fernando Serboncini Cr-Commit-Position: refs/heads/master@{#63811} --- src/execution/isolate.cc | 4 +++- src/flags/flag-definitions.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/execution/isolate.cc b/src/execution/isolate.cc index 38c35faa59..c66a1f3fd7 100644 --- a/src/execution/isolate.cc +++ b/src/execution/isolate.cc @@ -320,7 +320,9 @@ Isolate::FindOrAllocatePerThreadDataForThisThread() { base::MutexGuard lock_guard(&thread_data_table_mutex_); per_thread = thread_data_table_.Lookup(thread_id); if (per_thread == nullptr) { - base::OS::AdjustSchedulingParams(); + if (FLAG_adjust_os_scheduling_parameters) { + base::OS::AdjustSchedulingParams(); + } per_thread = new PerIsolateThreadData(this, thread_id); thread_data_table_.Insert(per_thread); } diff --git a/src/flags/flag-definitions.h b/src/flags/flag-definitions.h index a86e646165..28bd76d9b2 100644 --- a/src/flags/flag-definitions.h +++ b/src/flags/flag-definitions.h @@ -1238,6 +1238,8 @@ DEFINE_BOOL(print_all_exceptions, false, DEFINE_BOOL( detailed_error_stack_trace, false, "includes arguments for each function call in the error stack frames array") +DEFINE_BOOL(adjust_os_scheduling_parameters, true, + "adjust OS specific scheduling params for the isolate") // runtime.cc DEFINE_BOOL(runtime_call_stats, false, "report runtime call counts and times")