// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "gin/gin_features.h" #include "base/metrics/field_trial_params.h" namespace features { // Enable code space compaction when finalizing a full GC with stack. BASE_FEATURE(…); // Enable compaction when finalizing a full GC with stack. BASE_FEATURE(…); // Decommit (rather than discard) pooled pages. BASE_FEATURE(…); // Enables optimization of JavaScript in V8. BASE_FEATURE(…); // Enables flushing of JS bytecode in V8. BASE_FEATURE(…); const base::FeatureParam<int> kV8FlushBytecodeOldAge{ … }; // Enables flushing of baseline code in V8. BASE_FEATURE(…); // Enables code flushing based on tab visibility. BASE_FEATURE(…); // Enables code flushing based on time. BASE_FEATURE(…); const base::FeatureParam<int> kV8FlushCodeOldTime{ … }; // Enables finalizing streaming JS compilations on a background thread. BASE_FEATURE(…); // Enables lazy feedback allocation in V8. BASE_FEATURE(…); // Enables per-context marking worklists in V8 GC. BASE_FEATURE(…); // Enables flushing of the instruction cache for the embedded blob. BASE_FEATURE(…); // Enables reduced number of concurrent marking tasks. BASE_FEATURE(…); // Disables reclaiming of unmodified wrappers objects. BASE_FEATURE(…); // Enables W^X code memory protection in V8. // This is enabled in V8 by default. To test the performance impact, we are // going to disable this feature in a finch experiment. BASE_FEATURE(…); // Enables fallback to a breadth-first regexp engine on excessive backtracking. BASE_FEATURE(…); // Enables the Turbofan compiler. BASE_FEATURE(…); // Enables Turbofan's new compiler IR Turboshaft. BASE_FEATURE(…); // Enable running instruction selection on Turboshaft IR directly. BASE_FEATURE(…); // Enables Maglev compiler. Note that this only sets the V8 flag when // manually overridden; otherwise it defers to whatever the V8 default is. BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); const base::FeatureParam<int> kV8MemoryReducerGCCount{ … }; // Enables MinorMC young generation garbage collector. BASE_FEATURE(…); BASE_FEATURE(…); const base::FeatureParam<int> kV8ScavengerMaxCapacity{ … }; // Enables Sparkplug compiler. Note that this only sets the V8 flag when // manually overridden; otherwise it defers to whatever the V8 default is. BASE_FEATURE(…); // Enables the concurrent Sparkplug compiler. BASE_FEATURE(…); const base::FeatureParam<int> kV8ConcurrentSparkplugMaxThreads{ … }; BASE_FEATURE(…); // Makes sure the experimental Sparkplug compiler is only enabled if short // builtin calls are enabled too. BASE_FEATURE(…); // Enables batch compilation for Sparkplug (baseline) compilation. BASE_FEATURE(…); // Enables short builtin calls feature. BASE_FEATURE(…); // Enables fast API calls in TurboFan. BASE_FEATURE(…); // Enables faster DOM methods for megamorphic ICs BASE_FEATURE(…); // Faster object cloning BASE_FEATURE(…); // Avoids background threads for GC if isolate is in background. BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); // Use V8 efficiency mode for tiering decisions. BASE_FEATURE(…); const base::FeatureParam<int> kV8EfficiencyModeTieringDelayTurbofan{ … }; // Enables slow histograms that provide detailed information at increased // runtime overheads. BASE_FEATURE(…); // Multiple finch experiments might use slow-histograms. We introduce // separate feature flags to circumvent finch limitations. BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); // Enable 16GB heap reservation for Oilpan. BASE_FEATURE(…); BASE_FEATURE(…); const base::FeatureParam<base::TimeDelta> kV8MemoryReducerStartDelay{ … }; BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); // Elide redundant TDZ hole checks in bytecode. This only sets the V8 flag when // manually overridden. BASE_FEATURE(…); // Add additional alignment for some jumps in generated x64 code, to mitigate // the performance impact of the Intel JCC erratum (https://crbug.com/v8/14225). // Currently disabled by default in V8, but adding here temporarily to test // real-world performance impact via a Finch experiment. BASE_FEATURE(…); // JavaScript language features. // Enables the experiment with compile hints as magic comments. BASE_FEATURE(…); // Enables the iterator helpers proposal. BASE_FEATURE(…); // Enables the Promise.withResolvers proposal. BASE_FEATURE(…); // Enables the RegExp modifiers proposal. BASE_FEATURE(…); // Enables the `with` syntax for the Import Attributes proposal. BASE_FEATURE(…); // Enables the set methods proposal. BASE_FEATURE(…); // Enables the RegExp duplicate named capture groups proposal. BASE_FEATURE(…); // Enables the Promise.try proposal. BASE_FEATURE(…); // WebAssembly features. // Enable WebAssembly deoptimization support (not user visible), see // https://crbug.com/42204618. BASE_FEATURE(…); // Enable WebAssembly inlining (not user visible). BASE_FEATURE(…); // Feature for WebAssembly speculative inlining of indirect calls (see // https://crbug.com/335082212; and https://crbug.com/40898108 for direct call // and call_ref inlining, which has already launched above). Not user visible. BASE_FEATURE(…); // Enable WebAssembly code flushing. BASE_FEATURE(…); // Enable the generic wasm-to-js wrapper. BASE_FEATURE(…); // Enable support for multiple memories according to the multi-memory proposal: // https://github.com/WebAssembly/multi-memory. See // https://chromestatus.com/feature/5106389887746048. BASE_FEATURE(…); BASE_FEATURE(…); BASE_FEATURE(…); // Feature for more aggressive code caching (https://crbug.com/v8/14411, // https://crbug.com/40945417) and three parameters to control caching behavior. BASE_FEATURE(…); const base::FeatureParam<int> kWebAssemblyMoreAggressiveCodeCachingThreshold{ … }; const base::FeatureParam<int> kWebAssemblyMoreAggressiveCodeCachingTimeoutMs{ … }; const base::FeatureParam<int> kWebAssemblyMoreAggressiveCodeCachingHardThreshold{ … }; } // namespace features