Leszek Swirski | 2987cc8 | 2018-11-05 15:19:28 | [diff] [blame] | 1 | // Copyright 2018 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "base/task/task_features.h" |
| 6 | |
David Sanders | 6e70994 | 2022-04-05 06:49:26 | [diff] [blame] | 7 | #include "base/base_export.h" |
Leszek Swirski | 2987cc8 | 2018-11-05 15:19:28 | [diff] [blame] | 8 | #include "base/feature_list.h" |
| 9 | |
| 10 | namespace base { |
| 11 | |
Etienne Pierre-doray | 3ed4138 | 2019-02-06 04:40:47 | [diff] [blame] | 12 | const Feature kMayBlockWithoutDelay = {"MayBlockWithoutDelay", |
| 13 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 14 | |
Etienne Pierre-doray | ea2b21e | 2020-10-26 22:38:59 | [diff] [blame] | 15 | const Feature kDisableJobYield = {"DisableJobYield", |
| 16 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 17 | |
| 18 | const Feature kDisableFairJobScheduling = {"DisableFairJobScheduling", |
| 19 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 20 | |
| 21 | const Feature kDisableJobUpdatePriority = {"DisableJobUpdatePriority", |
| 22 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 23 | |
| 24 | const Feature kWakeUpStrategyFeature = {"WakeUpStrategyFeature", |
| 25 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 26 | |
| 27 | constexpr FeatureParam<WakeUpStrategy>::Option kWakeUpStrategyOptions[] = { |
| 28 | {WakeUpStrategy::kCentralizedWakeUps, "centralized-wakeups"}, |
| 29 | {WakeUpStrategy::kSerializedWakeUps, "serialized-wakeups"}, |
Etienne Pierre-doray | b5fe0b5f | 2021-01-29 18:37:27 | [diff] [blame] | 30 | {WakeUpStrategy::kExponentialWakeUps, "exponential-wakeups"}, |
| 31 | {WakeUpStrategy::kGreedyWakeUps, "greedy-wakeups"}}; |
Etienne Pierre-doray | ea2b21e | 2020-10-26 22:38:59 | [diff] [blame] | 32 | |
| 33 | const base::FeatureParam<WakeUpStrategy> kWakeUpStrategyParam{ |
| 34 | &kWakeUpStrategyFeature, "strategy", WakeUpStrategy::kExponentialWakeUps, |
| 35 | &kWakeUpStrategyOptions}; |
| 36 | |
| 37 | const Feature kWakeUpAfterGetWork = {"WakeUpAfterGetWork", |
| 38 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 39 | |
Francois Doray | ee4a553 | 2021-03-30 00:17:17 | [diff] [blame] | 40 | #if HAS_NATIVE_THREAD_POOL() |
Aditya Keerthi | a41eda5 | 2019-04-01 15:03:25 | [diff] [blame] | 41 | const Feature kUseNativeThreadPool = {"UseNativeThreadPool", |
| 42 | base::FEATURE_DISABLED_BY_DEFAULT}; |
Francois Doray | ee4a553 | 2021-03-30 00:17:17 | [diff] [blame] | 43 | const Feature kUseBackgroundNativeThreadPool = { |
| 44 | "UseBackgroundNativeThreadPool", base::FEATURE_DISABLED_BY_DEFAULT}; |
Aditya Keerthi | a41eda5 | 2019-04-01 15:03:25 | [diff] [blame] | 45 | #endif |
| 46 | |
Francois Doray | a20b6df2 | 2019-06-27 15:04:19 | [diff] [blame] | 47 | const Feature kUseFiveMinutesThreadReclaimTime = { |
| 48 | "UseFiveMinutesThreadReclaimTime", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 49 | |
Patrick Monette | eaaa238 | 2021-12-08 17:06:59 | [diff] [blame] | 50 | const BASE_EXPORT Feature kRemoveCanceledTasksInTaskQueue = { |
Patrick Monette | d85b816 | 2022-01-27 00:23:23 | [diff] [blame] | 51 | "RemoveCanceledTasksInTaskQueue2", base::FEATURE_DISABLED_BY_DEFAULT}; |
Patrick Monette | eaaa238 | 2021-12-08 17:06:59 | [diff] [blame] | 52 | |
Etienne Pierre-doray | a879273 | 2022-02-05 02:27:25 | [diff] [blame] | 53 | const BASE_EXPORT Feature kAddTaskLeewayFeature = { |
| 54 | "AddTaskLeeway", base::FEATURE_ENABLED_BY_DEFAULT}; |
| 55 | |
| 56 | const base::FeatureParam<TimeDelta> kTaskLeewayParam{&kAddTaskLeewayFeature, |
| 57 | "leeway", Milliseconds(8)}; |
| 58 | |
Etienne Pierre-doray | 048472eb | 2022-02-07 16:24:48 | [diff] [blame] | 59 | const BASE_EXPORT Feature kAlignWakeUps = {"AlignWakeUps", |
| 60 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 61 | |
Etienne Pierre-doray | ae2c15a | 2022-04-29 18:50:59 | [diff] [blame] | 62 | const BASE_EXPORT Feature kExplicitHighResolutionTimerWin = { |
| 63 | "ExplicitHighResolutionTimerWin", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 64 | |
Alex Attar | 9fcc01e | 2022-05-20 14:01:27 | [diff] [blame^] | 65 | const BASE_EXPORT Feature kRunTasksByBatches = { |
| 66 | "RunThreadControllerTasksByBatches", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 67 | |
Francois Doray | 5b44e33f | 2018-11-09 22:08:13 | [diff] [blame] | 68 | } // namespace base |