Skip to content

Commit

Permalink
[v8][wasm][code flushing][gin] Add flag and field trial for code flus…
Browse files Browse the repository at this point in the history
…hing

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}
  • Loading branch information
evicy authored and Chromium LUCI CQ committed May 10, 2024
1 parent c43cb85 commit f3c64ba
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gin/gin_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions gin/gin_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions gin/v8_initializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
28 changes: 28 additions & 0 deletions testing/variations/fieldtrial_testing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit f3c64ba

Please sign in to comment.