Avi Drissman | 468e51b6 | 2022-09-13 20:47:01 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors |
Ross McIlroy | 45e9500a | 2018-03-27 17:06:02 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef GIN_GIN_FEATURES_H_ |
| 6 | #define GIN_GIN_FEATURES_H_ |
| 7 | |
| 8 | #include "base/feature_list.h" |
Lei Zhang | ca268b39 | 2021-04-26 21:25:42 | [diff] [blame] | 9 | #include "base/metrics/field_trial_params.h" |
Etienne Pierre-doray | 87b4b84b | 2022-08-09 20:04:48 | [diff] [blame] | 10 | #include "base/time/time.h" |
Ross McIlroy | 45e9500a | 2018-03-27 17:06:02 | [diff] [blame] | 11 | #include "gin/gin_export.h" |
| 12 | |
| 13 | namespace features { |
| 14 | |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 15 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8CompactCodeSpaceWithStack); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 16 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8CompactWithStack); |
| 17 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8ConcurrentSparkplug); |
Victor Gomes | 409ef5a | 2021-12-02 09:47:35 | [diff] [blame] | 18 | GIN_EXPORT extern const base::FeatureParam<int> |
| 19 | kV8ConcurrentSparkplugMaxThreads; |
Camillo Bruni | c8566b86 | 2023-02-16 09:10:48 | [diff] [blame] | 20 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8CodeMemoryWriteProtection); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 21 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8ConcurrentSparkplugHighPriorityThreads); |
Camillo Bruni | c8566b86 | 2023-02-16 09:10:48 | [diff] [blame] | 22 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8DelayMemoryReducer); |
Etienne Pierre-doray | 89f7507 | 2023-05-13 15:08:44 | [diff] [blame] | 23 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8ConcurrentMarkingHighPriorityThreads); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 24 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8ExperimentalRegexpEngine); |
Toon Verwaest | 60185fc | 2022-07-27 10:40:30 | [diff] [blame] | 25 | GIN_EXPORT extern const base::FeatureParam<int> kV8FlushBytecodeOldAge; |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 26 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushBaselineCode); |
Camillo Bruni | c8566b86 | 2023-02-16 09:10:48 | [diff] [blame] | 27 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushBytecode); |
Dominik Inführ | aa5f511 | 2023-06-07 21:07:35 | [diff] [blame] | 28 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushCodeBasedOnTabVisibility); |
| 29 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushCodeBasedOnTime); |
| 30 | GIN_EXPORT extern const base::FeatureParam<int> kV8FlushCodeOldTime; |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 31 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushEmbeddedBlobICache); |
Shu-yu Guo | 07bdfb4 | 2023-05-11 21:01:54 | [diff] [blame] | 32 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8IgnitionElideRedundantTdzChecks); |
Daniel Lehmann | 456950c | 2024-02-09 14:05:54 | [diff] [blame] | 33 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8IntelJCCErratumMitigation); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 34 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8LazyFeedbackAllocation); |
Leszek Swirski | dcd9023a | 2022-09-21 11:03:39 | [diff] [blame] | 35 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8Maglev); |
Dominik Inführ | 390e747 | 2023-08-15 07:33:39 | [diff] [blame] | 36 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8MemoryReducer); |
| 37 | GIN_EXPORT extern const base::FeatureParam<int> kV8MemoryReducerGCCount; |
Omer Katz | 257c88da | 2023-07-11 09:17:16 | [diff] [blame] | 38 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8MinorMS); |
Camillo Bruni | c8566b86 | 2023-02-16 09:10:48 | [diff] [blame] | 39 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8MegaDomIC); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 40 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8NoReclaimUnmodifiedWrappers); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 41 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8OffThreadFinalization); |
| 42 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8OptimizeJavascript); |
| 43 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8PerContextMarkingWorklist); |
Olivier Flückiger | 43e22a7 | 2024-01-16 12:46:20 | [diff] [blame] | 44 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8ProfileGuidedOptimization); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 45 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8ReduceConcurrentMarkingTasks); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 46 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8ShortBuiltinCalls); |
Dominik Inführ | 99a23d3 | 2023-08-02 15:40:29 | [diff] [blame] | 47 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8SingleThreadedGCInBackground); |
Olivier Flückiger | c722bf48 | 2023-12-20 12:47:42 | [diff] [blame] | 48 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8EfficiencyModeTiering); |
| 49 | GIN_EXPORT extern const base::FeatureParam<int> |
| 50 | kV8EfficiencyModeTieringDelayTurbofan; |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 51 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistograms); |
| 52 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistogramsCodeMemoryWriteProtection); |
Camillo Bruni | c8566b86 | 2023-02-16 09:10:48 | [diff] [blame] | 53 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistogramsNoTurbofan); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 54 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistogramsSparkplug); |
| 55 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistogramsSparkplugAndroid); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 56 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8Sparkplug); |
| 57 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8SparkplugNeedsShortBuiltinCalls); |
Camillo Bruni | c8566b86 | 2023-02-16 09:10:48 | [diff] [blame] | 58 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8Turbofan); |
Nico Hartmann | c87b89e | 2023-06-14 14:29:06 | [diff] [blame] | 59 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8Turboshaft); |
Nico Hartmann | d88debc | 2023-10-25 16:48:30 | [diff] [blame] | 60 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8TurboshaftInstructionSelection); |
Daniel Cheng | aab4b01b | 2022-09-20 14:28:38 | [diff] [blame] | 61 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8TurboFastApiCalls); |
Scott Violet | 744f9f87 | 2022-12-15 20:24:51 | [diff] [blame] | 62 | GIN_EXPORT BASE_DECLARE_FEATURE(kV8UseLibmTrigFunctions); |
Etienne Pierre-doray | 87b4b84b | 2022-08-09 20:04:48 | [diff] [blame] | 63 | GIN_EXPORT extern const base::FeatureParam<base::TimeDelta> |
| 64 | kV8MemoryReducerStartDelay; |
Marja Hölttä | f7ec866 | 2022-11-21 12:50:15 | [diff] [blame] | 65 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptRabGsab); |
Shu-yu Guo | dea0deba | 2023-02-09 10:07:43 | [diff] [blame] | 66 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptRegExpUnicodeSets); |
Camillo Bruni | c8566b86 | 2023-02-16 09:10:48 | [diff] [blame] | 67 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptSymbolAsWeakMapKey); |
Shu-yu Guo | f714e371 | 2023-03-30 01:19:36 | [diff] [blame] | 68 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptJsonParseWithSource); |
Shu-yu Guo | 898b9017 | 2023-03-30 21:18:23 | [diff] [blame] | 69 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptArrayBufferTransfer); |
Marja Hölttä | 24a0eb5 | 2023-04-17 13:57:25 | [diff] [blame] | 70 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptCompileHintsMagic); |
Rezvan Mahdavi Hezaveh | 777441c7 | 2023-06-15 23:42:31 | [diff] [blame] | 71 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptIteratorHelpers); |
Shu-yu Guo | 75a1e35 | 2023-09-15 01:04:51 | [diff] [blame] | 72 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptPromiseWithResolvers); |
Rezvan Mahdavi Hezaveh | ad79783b | 2023-11-02 21:51:24 | [diff] [blame] | 73 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptArrayFromAsync); |
Shu-yu Guo | 924f273 | 2023-12-20 23:32:14 | [diff] [blame] | 74 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptRegExpModifiers); |
Nicolò Ribaudo | cc6f9572 | 2024-01-09 16:44:57 | [diff] [blame] | 75 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptImportAttributes); |
Rezvan Mahdavi Hezaveh | dde4721 | 2024-01-12 22:21:44 | [diff] [blame] | 76 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptSetMethods); |
Shu-yu Guo | bf2f7aa | 2024-01-31 19:01:55 | [diff] [blame] | 77 | GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptRegExpDuplicateNamedGroups); |
Thibaud Michaud | a76870a | 2023-01-31 18:48:38 | [diff] [blame] | 78 | GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyTailCall); |
Clemens Backes | b63dded | 2023-03-15 12:51:54 | [diff] [blame] | 79 | GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyInlining); |
Andreas Haas | 79abc46 | 2023-10-04 08:17:57 | [diff] [blame] | 80 | GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyGenericWrapper); |
Clemens Backes | c94fd76 | 2023-10-23 15:14:07 | [diff] [blame] | 81 | GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyMultipleMemories); |
Manos Koukoutos | 582a5b763 | 2023-10-28 07:05:41 | [diff] [blame] | 82 | GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyTurboshaft); |
Manos Koukoutos | 183e930 | 2023-12-01 15:43:05 | [diff] [blame] | 83 | GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyTurboshaftInstructionSelection); |
Ross McIlroy | 45e9500a | 2018-03-27 17:06:02 | [diff] [blame] | 84 | |
Clemens Backes | 6cdcedb | 2023-11-24 08:22:40 | [diff] [blame] | 85 | // Feature for more aggressive code caching (https://crbug.com/v8/14411) and |
| 86 | // three parameters to control caching behavior. |
| 87 | GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyMoreAggressiveCodeCaching); |
| 88 | GIN_EXPORT extern const base::FeatureParam<int> |
| 89 | kWebAssemblyMoreAggressiveCodeCachingThreshold; |
| 90 | GIN_EXPORT extern const base::FeatureParam<int> |
| 91 | kWebAssemblyMoreAggressiveCodeCachingTimeoutMs; |
| 92 | GIN_EXPORT extern const base::FeatureParam<int> |
| 93 | kWebAssemblyMoreAggressiveCodeCachingHardThreshold; |
| 94 | |
Ross McIlroy | 45e9500a | 2018-03-27 17:06:02 | [diff] [blame] | 95 | } // namespace features |
| 96 | |
| 97 | #endif // GIN_GIN_FEATURES_H_ |