0

[v8][wasm][code flushing][gin] Add flag and field trial for code flushing

Prepare launch via Finch by adding a gin feature and field trial for
Liftoff code flushing.

Bug: 339120678
Change-Id: Iff319621817d4ddfa3ed9c6dcdd8965c3c444528
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526355
Commit-Queue: Eva Herencsárová <evih@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299164}
This commit is contained in:
Eva Herencsarova
2024-05-10 10:47:29 +00:00
committed by Chromium LUCI CQ
parent c43cb8533c
commit f3c64baf87
4 changed files with 36 additions and 0 deletions

@ -299,6 +299,11 @@ BASE_FEATURE(kWebAssemblyInlining,
"WebAssemblyInlining",
base::FEATURE_DISABLED_BY_DEFAULT);
// Enable WebAssembly code flushing.
BASE_FEATURE(kWebAssemblyLiftoffCodeFlushing,
"WebAssemblyLiftoffCodeFlushing",
base::FEATURE_DISABLED_BY_DEFAULT);
// Enable the generic wasm-to-js wrapper.
BASE_FEATURE(kWebAssemblyGenericWrapper,
"WebAssemblyGenericWrapper",

@ -80,6 +80,7 @@ GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptSetMethods);
GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptRegExpDuplicateNamedGroups);
GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyTailCall);
GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyInlining);
GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyLiftoffCodeFlushing);
GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyGenericWrapper);
GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyMultipleMemories);
GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyTurboshaft);

@ -449,6 +449,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
SetV8FlagsIfOverridden(features::kWebAssemblyInlining,
"--experimental-wasm-inlining",
"--no-experimental-wasm-inlining");
SetV8FlagsIfOverridden(features::kWebAssemblyLiftoffCodeFlushing,
"--flush-liftoff-code", "--no-flush-liftoff-code");
SetV8FlagsIfOverridden(features::kWebAssemblyGenericWrapper,
"--wasm-to-js-generic-wrapper",
"--no-wasm-to-js-generic-wrapper");

@ -21541,6 +21541,34 @@
]
}
],
"V8WasmCodeFlushing": [
{
"platforms": [
"android",
"android_weblayer",
"android_webview",
"chromeos",
"chromeos_lacros",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"WebAssemblyLiftoffCodeFlushing"
]
},
{
"name": "Control",
"disable_features": [
"WebAssemblyLiftoffCodeFlushing"
]
}
]
}
],
"V8WasmInlining": [
{
"platforms": [