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")