Issue 12852 in v8: Tracking bug: lazy compilation for WebAssembly

33 views
Skip to first unread message

ah… via monorail

unread,
May 4, 2022, 9:04:01 AM5/4/22
to v8-re...@googlegroups.com
Status: Assigned
Owner: ah...@chromium.org
Components: WebAssembly
Type: Bug

New issue 12852 by ah...@chromium.org: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852

Performance analysis: https://docs.google.com/document/d/1d0di0cbgCPIvyyKMMTriBTHv45faUzFGgx0ZLFD9G2Q/edit#heading=h.n8udcvchg5i9

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Git Watcher via monorail

unread,
May 5, 2022, 1:08:07 PM5/5/22
to v8-re...@googlegroups.com

Comment #1 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c1

The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/5fcd9e1e8783d6d68489497cf5549274642afb81

commit 5fcd9e1e8783d6d68489497cf5549274642afb81
Author: Andreas Haas <ah...@chromium.org>
Date: Thu May 05 16:10:20 2022

[wasm] Disable memory protection with mprotect for lazy compilation

The write protection of code memory with mprotect is too expensive for
lazy compilation. As the usefulness of this memory protection is
limited anyways, this CL disables the memory protection in case lazy
compilation is enabled.

Bug: v8:12852
Change-Id: I4c56d4021a7b594e24a4d3d28a130a309c56de38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627596
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80377}

[modify] https://crrev.com/5fcd9e1e8783d6d68489497cf5549274642afb81/src/flags/flag-definitions.h

Git Watcher via monorail

unread,
Aug 2, 2022, 4:53:05 AM8/2/22
to v8-re...@googlegroups.com

Comment #2 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c2


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/d1edb5684da950bbc86b4963c72c62fac23158ab

commit d1edb5684da950bbc86b4963c72c62fac23158ab
Author: Andreas Haas <ah...@chromium.org>
Date: Mon Aug 01 11:11:43 2022

[wasm] Adjust test conditions for lazy compilation

Bug: v8:12852
Change-Id: I4f38a41afe07633060038151acee986f318103b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3795376

Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>

Git Watcher via monorail

unread,
Aug 2, 2022, 7:22:24 AM8/2/22
to v8-re...@googlegroups.com

Comment #3 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c3


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/69ca31e296aaf072d9e6cf4039c70fce6fdee65c

commit 69ca31e296aaf072d9e6cf4039c70fce6fdee65c
Author: Andreas Haas <ah...@chromium.org>
Date: Tue Aug 02 10:14:38 2022

[wasm] Fix incorrect DCHECK for lazy-compilation + TierDown mode

In TierDown mode, all functions have to be compiled with Liftoff, even
if lazy compilation is enabled.

R=clem...@chromium.org

Bug: v8:12852
Change-Id: If450563a6768f82439c77ef7c21ecef8e2b25475
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804255

Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>

Git Watcher via monorail

unread,
Aug 2, 2022, 8:59:16 AM8/2/22
to v8-re...@googlegroups.com

Comment #4 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c4


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5

commit 4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5
Author: Andreas Haas <ah...@chromium.org>
Date: Tue Aug 02 11:24:32 2022

Reland: [wasm] WasmCompileLazyFrame scanning

The original CL did not handle the case where a GC gets triggered by
the allocation of the error object when compilation fails.

Orignal message:

Feedback vector allocation can trigger a GC, and thereby make the
WasmCompileLazyFrame visible for the GC. This CL add stack scanning
for the WasmCompileLazyFrame.

Design doc: http://doc/1peovM6N6C4nSEdC77l4uxU1L0njA0RTaOjy5F12r2CQ

Change-Id: I9be66c696e27f9ecf8228daf40ad6258f0e963d1

Bug: v8:12852
Fix: v8:13133
Change-Id: I9be66c696e27f9ecf8228daf40ad6258f0e963d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804599
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82138}

[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/execution/arm64/frame-constants-arm64.h
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/builtins/x64/builtins-x64.cc
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/runtime/runtime.h
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/builtins/arm64/builtins-arm64.cc
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/execution/ia32/frame-constants-ia32.h
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/wasm/module-compiler.cc
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/wasm/module-compiler.h
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/builtins/arm/builtins-arm.cc
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/execution/arm/frame-constants-arm.h
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/execution/frames.cc
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/execution/frames.h
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/builtins/ia32/builtins-ia32.cc
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/execution/x64/frame-constants-x64.h
[modify] https://crrev.com/4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5/src/runtime/runtime-wasm.cc

Git Watcher via monorail

unread,
Aug 3, 2022, 9:47:13 AM8/3/22
to v8-re...@googlegroups.com

Comment #5 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c5


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/8d0c71d7c70f5f0a27331b20f4411ca6845f626e

commit 8d0c71d7c70f5f0a27331b20f4411ca6845f626e
Author: Andreas Haas <ah...@chromium.org>
Date: Wed Aug 03 10:16:29 2022

[wasm][lazy] Fix error message of async compilation

Async compilation with lazy compilation generated an error message that
did not include the function name. With this CL the function name now
gets included.

R=clem...@chromium.org

Bug: v8:12852
Change-Id: Ia8aed83a2114a2c9da1367045404b20fa8554c8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804863
Commit-Queue: Andreas Haas <ah...@chromium.org>
Reviewed-by: Clemens Backes <clem...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82172}

[modify] https://crrev.com/8d0c71d7c70f5f0a27331b20f4411ca6845f626e/test/mjsunit/regress/wasm/regress-956771.js
[modify] https://crrev.com/8d0c71d7c70f5f0a27331b20f4411ca6845f626e/src/wasm/module-compiler.cc
[modify] https://crrev.com/8d0c71d7c70f5f0a27331b20f4411ca6845f626e/test/mjsunit/wasm/compilation-hints-async-compilation.js

Git Watcher via monorail

unread,
Aug 3, 2022, 11:35:19 AM8/3/22
to v8-re...@googlegroups.com

Comment #6 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c6


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/7c5f3782087a1ad1610f4b965409e9faeda8196a

commit 7c5f3782087a1ad1610f4b965409e9faeda8196a
Author: Andreas Haas <ah...@chromium.org>
Date: Tue Aug 02 13:20:11 2022

[wasm] Fix test condition for lazy compilation

R=clem...@chromium.org

Bug: v8:12852
Change-Id: I3fbae50b164cca4ad1c0fefb856070ae2e472ff5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3805059
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82180}

[modify] https://crrev.com/7c5f3782087a1ad1610f4b965409e9faeda8196a/test/cctest/wasm/test-streaming-compilation.cc

Git Watcher via monorail

unread,
Aug 3, 2022, 11:44:13 AM8/3/22
to v8-re...@googlegroups.com

Comment #7 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c7


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/fe53fbfca0c59606da24c2834b461e82371192cc

commit fe53fbfca0c59606da24c2834b461e82371192cc
Author: Andreas Haas <ah...@chromium.org>
Date: Tue Aug 02 13:28:05 2022

[wasm] Delay error messages for lazy compilation

With streaming compilation we delay the generation of errors until after
all bytes are received, so that potentially better error messages get
generated. With this CL we also delay the generation of errors in the
combination of lazy compilation and streaming compilation.

In particular, this CL does the following:
* It avoids the creation of a `DecodeFail` task in
`FinishAsyncCompileJobWithError`, which would create an error immediately before a potential name section arrived.
* It calls `CompilationStateImpl::SetError()` so that an error is
created once the stream finishes.
* It removes the return value of `ProcessFunctionBody` so that wire
bytes continue to be received even after a validation error.
* It adds an early exit to `ProcessFunctionBody` if
`CompilationStateImpl::failed()` is true, so that we don't continue
validation after the first detected error.

R=clem...@chromium.org

Bug: v8:12852
Change-Id: Ie8c6be243a257ef62cbb29fea6b8e0c205060680
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3802691

Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>

Git Watcher via monorail

unread,
Aug 3, 2022, 9:00:11 PM8/3/22
to v8-re...@googlegroups.com

Comment #8 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c8


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/0c785c076090a32875dac8c4ec02d886e3a42a35

commit 0c785c076090a32875dac8c4ec02d886e3a42a35
Author: QiuJi <qi...@iscas.ac.cn>
Date: Wed Aug 03 15:39:24 2022

[riscv] Reland: [wasm] WasmCompileLazyFrame scanning

Port 4e329f8c8aa0c97774892e9c3ccaf72f5d74d2b5
Also fix 64-bit addressed stores on riscv64

Bug: v8:12852
Bug: v8:10949
Change-Id: Ibc0d4efe04da5b4ca3c3e6c2997655b8d3795004
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3806593
Commit-Queue: Yahan Lu <ya...@iscas.ac.cn>
Auto-Submit: ji qiu <qi...@iscas.ac.cn>
Reviewed-by: Yahan Lu <ya...@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82186}

[modify] https://crrev.com/0c785c076090a32875dac8c4ec02d886e3a42a35/src/builtins/riscv64/builtins-riscv64.cc
[modify] https://crrev.com/0c785c076090a32875dac8c4ec02d886e3a42a35/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h
[modify] https://crrev.com/0c785c076090a32875dac8c4ec02d886e3a42a35/src/execution/riscv64/frame-constants-riscv64.h

Git Watcher via monorail

unread,
Aug 4, 2022, 3:47:15 PM8/4/22
to v8-re...@googlegroups.com

Comment #9 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c9


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/78ec12e928505a46033b67a3c0afa6b9d30ace94

commit 78ec12e928505a46033b67a3c0afa6b9d30ace94
Author: Andreas Haas <ah...@chromium.org>
Date: Thu Aug 04 05:29:10 2022

[wasm] Fix test condition in test-wasm-metrics.cc for lazy compilation

R=ecmzi...@chromium.org

Bug: v8:12852
Change-Id: I69fc153aefa9711fce22a1330b9d24910a467b3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3809812
Reviewed-by: Emanuel Ziegler <ecmzi...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82207}

[modify] https://crrev.com/78ec12e928505a46033b67a3c0afa6b9d30ace94/test/cctest/wasm/test-wasm-metrics.cc

Git Watcher via monorail

unread,
Aug 5, 2022, 6:46:23 AM8/5/22
to v8-re...@googlegroups.com

Comment #10 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c10


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/2b50e9cee9046af5a4a44d985e1784a3313f7937

commit 2b50e9cee9046af5a4a44d985e1784a3313f7937
Author: Andreas Haas <ah...@chromium.org>
Date: Fri Aug 05 07:40:47 2022

[wasm][lazy] Avoid validation in case of a prefix_cache_hit

If the same WebAssembly module gets compiled multiple times, the
compilation result of the first compilation gets reused for later
compilations. With streaming compilation functions get compiled before
the whole module got downloaded, so it cannot be determined if the
currently compiled module has already been compiled or not. Therefore,
to check if the WebAssembly module has already been compiled, we compare
if the hash of the header section matches the hash of any of the already
compiled modules. If so, no function gets compiled until all bytes were
received. Then a full module check can be done, and either an existing
module can be reused, or the whole module gets compiled.

While compilation is avoided after a prefix_cache_hit, decoding still has
to happen. In the existing implementation, validation for lazy
compilation also happened in addition to decoding. This lead to the
problem that validation of lazy compilation could post a foreground task
when an error was detected, and later another foreground task got posted
when all bytes were received to do the full module check. Having two
foreground tasks at the same time violates an invariant in the
AsyncCompileJob.

With this CL we avoid the initial function validation after a
prefix_cache_hit to avoid the task for the error handling. Validation
will anyways happen again if the full module check fails later, or
validation is unnecessary if the full module check succeeds, as the
module has already been validated before.

R=clem...@chromium.org

Bug: v8:13147, v8:12852
Change-Id: Iae24c056057f3a5dfd2f61accd1f9f0d35412996
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812038

Commit-Queue: Andreas Haas <ah...@chromium.org>
Reviewed-by: Clemens Backes <clem...@chromium.org>

Git Watcher via monorail

unread,
Aug 8, 2022, 4:41:14 AM8/8/22
to v8-re...@googlegroups.com

Comment #11 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c11


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/0b68bed9c75bd02fe246c61065a1e9005f166c02

commit 0b68bed9c75bd02fe246c61065a1e9005f166c02
Author: Andreas Haas <ah...@chromium.org>
Date: Mon Aug 08 07:19:59 2022

[wasm] Add metrics for lazy compilation

This CL adds three metrics for lazy compilation: the number of functions
compiled lazily, the total time spent on compiling functions lazily,
and the maximum time spent on compiling a single function. All three
metrics get recorded twice, once 5 seconds after instantiation, and once
20 seconds after instantiation.

R=clem...@chromium.org

Bug: v8:12852
Change-Id: Ib9e5e12921fb1ec7aefd53af604cbb389bee79b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811502
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82248}

[modify] https://crrev.com/0b68bed9c75bd02fe246c61065a1e9005f166c02/src/logging/counters-definitions.h
[modify] https://crrev.com/0b68bed9c75bd02fe246c61065a1e9005f166c02/src/wasm/module-compiler.cc
[modify] https://crrev.com/0b68bed9c75bd02fe246c61065a1e9005f166c02/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/0b68bed9c75bd02fe246c61065a1e9005f166c02/src/wasm/module-instantiate.cc
[modify] https://crrev.com/0b68bed9c75bd02fe246c61065a1e9005f166c02/src/wasm/wasm-code-manager.h

Git Watcher via monorail

unread,
Aug 8, 2022, 7:11:15 AM8/8/22
to v8-re...@googlegroups.com

Comment #12 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c12


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/c0a375146505d1b9799f40f0d5a3e1cb6a40874a

commit c0a375146505d1b9799f40f0d5a3e1cb6a40874a
Author: Andreas Haas <ah...@chromium.org>
Date: Mon Aug 08 09:51:21 2022

[wasm] Disable lazy compilation in tests

Some tests assume lazy compilation is disabled.

Bug: v8:12852
Change-Id: I8e7bf0b7beeecf4ac385a458d7a178d0aa9cdbca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811292

Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>

Git Watcher via monorail

unread,
Aug 8, 2022, 7:29:05 AM8/8/22
to v8-re...@googlegroups.com

Comment #13 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c13


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/36ae442ec779482c6e2648bb18aaed8f2236202d

commit 36ae442ec779482c6e2648bb18aaed8f2236202d
Author: Andreas Haas <ah...@chromium.org>
Date: Mon Aug 08 07:55:27 2022

[wasm] Correctly increment the func_index for streaming compilation

The `num_functions_` counter got incremented at the exit of
`ProcessFunctionBody`, and for some exits it did not get incremented
at all. This was incorrect, it has to get incremented for each call to
`ProcessFunctionBody`. With this CL, `num_functions_` gets called at
the beginning of the function.

R=clem...@chromium.org

Bug: v8:12852
Change-Id: I554916a7217533234a82ba397c301b926ce86b99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811587

Commit-Queue: Andreas Haas <ah...@chromium.org>
Reviewed-by: Clemens Backes <clem...@chromium.org>

Git Watcher via monorail

unread,
Aug 8, 2022, 10:26:14 AM8/8/22
to v8-re...@googlegroups.com

Comment #14 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c14


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/d9dcca6d2fc3fb330766af5827e090bd48cb3057

commit d9dcca6d2fc3fb330766af5827e090bd48cb3057
Author: Andreas Haas <ah...@chromium.org>
Date: Mon Aug 08 11:21:30 2022

[wasm] Add lazy compilation metrics for 60s and 120s

In https://crrev.com/c/3811502 metrics for lazy compilation were
introduced that get recorded 5 seconds and 20 seconds after
instantiation. With this CL we record these metrics also 60 seconds and
120 seconds after instantiation.

R=clem...@chromium.org

Bug: v8:12852
Change-Id: If95a3453f6a8510b567d291158d4119b022c1c9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810248

Commit-Queue: Andreas Haas <ah...@chromium.org>
Reviewed-by: Clemens Backes <clem...@chromium.org>

Git Watcher via monorail

unread,
Aug 8, 2022, 10:56:14 AM8/8/22
to v8-re...@googlegroups.com

Comment #15 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c15


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/b9e7db851d2382c110f21e9372501b98d032b50d

commit b9e7db851d2382c110f21e9372501b98d032b50d
Author: Andreas Haas <ah...@chromium.org>
Date: Mon Aug 08 14:15:38 2022

[wasm] Fix gc test with lazy compilation

The test-gc cctest loads the WasmCode from the NativeModule and then
executes it. With lazy compilation, the WasmCode object first has to get
generated before it can get loaded.

R=jkum...@chromium.org

Bug: v8:12852
Change-Id: I83a8a2433ac5d11690c82f07e4ae01ddc979821c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3809811
Commit-Queue: Andreas Haas <ah...@chromium.org>
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82271}

[modify] https://crrev.com/b9e7db851d2382c110f21e9372501b98d032b50d/test/cctest/wasm/test-gc.cc

Git Watcher via monorail

unread,
Aug 9, 2022, 5:23:05 AM8/9/22
to v8-re...@googlegroups.com

Comment #16 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c16


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/b67385d22f2d3002799ceade857b0668858b2809

commit b67385d22f2d3002799ceade857b0668858b2809
Author: Andreas Haas <ah...@chromium.org>
Date: Fri Aug 05 11:45:10 2022

[wasm] Enable lazy compilation on --future

This should increase test coverage of lazy compilation.

R=clem...@chromium.org

Bug: v8:12852
Change-Id: I205f4b642576add07db5851126370becdad52fb8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3784597
Commit-Queue: Andreas Haas <ah...@chromium.org>
Reviewed-by: Clemens Backes <clem...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82291}

[modify] https://crrev.com/b67385d22f2d3002799ceade857b0668858b2809/src/flags/flag-definitions.h

Git Watcher via monorail

unread,
Aug 9, 2022, 7:34:06 AM8/9/22
to v8-re...@googlegroups.com

Comment #17 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c17


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/666aa19e9da484dfc8edacfacf19d591ebaedc43

commit 666aa19e9da484dfc8edacfacf19d591ebaedc43
Author: Tobias Tebbi <te...@chromium.org>
Date: Tue Aug 09 11:32:15 2022

Revert "[wasm] Enable lazy compilation on --future"

This reverts commit b67385d22f2d3002799ceade857b0668858b2809.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20no-concurrent-marking/10251/overview

Original change's description:

> [wasm] Enable lazy compilation on --future
>
> This should increase test coverage of lazy compilation.
>
> R=​clem...@chromium.org
>
> Bug: v8:12852
> Change-Id: I205f4b642576add07db5851126370becdad52fb8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3784597
> Commit-Queue: Andreas Haas <ah...@chromium.org>
> Reviewed-by: Clemens Backes <clem...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82291}

Bug: v8:12852
Change-Id: I7cb5a60aa5cf093c12371877b98c72ad754c5ed3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3819622
Commit-Queue: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Auto-Submit: Tobias Tebbi <te...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82300}

[modify] https://crrev.com/666aa19e9da484dfc8edacfacf19d591ebaedc43/src/flags/flag-definitions.h

Git Watcher via monorail

unread,
Aug 10, 2022, 2:11:15 AM8/10/22
to v8-re...@googlegroups.com

Comment #18 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c18


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/2eab3949976a70cdd35ac4c7121daf8b68c61cd7

commit 2eab3949976a70cdd35ac4c7121daf8b68c61cd7
Author: Andreas Haas <ah...@chromium.org>
Date: Tue Aug 09 13:01:24 2022

[wasm] Disable lazy compilation in unit test

{memory-protection-unittest} assumes that code objects exist after
compilation. This is not true with lazy compilation. Therefore this
CL disables lazy compilation in the test.

R=clem...@chromium.org

Bug: v8:12852
Change-Id: I66039319fdfe4354afb32064e3e9105d334f5b07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3819643

Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>

Git Watcher via monorail

unread,
Aug 10, 2022, 7:51:06 AM8/10/22
to v8-re...@googlegroups.com

Comment #19 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c19


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/b14e3cd4d74952d4ec9f862fccd7af5391e7e7c1

commit b14e3cd4d74952d4ec9f862fccd7af5391e7e7c1
Author: Andreas Haas <ah...@chromium.org>

Date: Fri Aug 05 11:45:10 2022

Reland "[wasm] Enable lazy compilation on --future"

This is a reland of commit b67385d22f2d3002799ceade857b0668858b2809

The fix landed in https://chromium-review.googlesource.com/c/v8/v8/+/3819643


Original change's description:
> [wasm] Enable lazy compilation on --future
>
> This should increase test coverage of lazy compilation.
>
> R=clem...@chromium.org
>
> Bug: v8:12852

> Change-Id: I205f4b642576add07db5851126370becdad52fb8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3784597
> Commit-Queue: Andreas Haas <ah...@chromium.org>
> Reviewed-by: Clemens Backes <clem...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82291}

Bug: v8:12852
Change-Id: I97c0aa7962b79e04dd778520e4c3108e20b83c10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3819641
Commit-Queue: Andreas Haas <ah...@chromium.org>
Reviewed-by: Tobias Tebbi <te...@chromium.org>
Reviewed-by: Clemens Backes <clem...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82339}

[modify] https://crrev.com/b14e3cd4d74952d4ec9f862fccd7af5391e7e7c1/src/flags/flag-definitions.h

Git Watcher via monorail

unread,
Aug 11, 2022, 12:01:29 PM8/11/22
to v8-re...@googlegroups.com

Comment #20 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c20


The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/eaba0a09caa56f5e4ee9f6331589a67f10d5a7c6

commit eaba0a09caa56f5e4ee9f6331589a67f10d5a7c6
Author: Andreas Haas <ah...@chromium.org>
Date: Thu Aug 11 16:00:49 2022

[wasm] Add histograms for lazy compilation metrics

This CL adds the histograms for the metrics introduced in
https://crrev.com/c/3811502 and https://crrev.com/c/3810248.

R=mlip...@chromium.org
CC=clem...@chromium.org

Bug: v8:12852
Change-Id: I272985a3256a6258178a689a43cd5b448d97c8e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3824342
Reviewed-by: Michael Lippautz <mlip...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1034014}

[modify] https://crrev.com/eaba0a09caa56f5e4ee9f6331589a67f10d5a7c6/tools/metrics/histograms/metadata/v8/histograms.xml

Git Watcher via monorail

unread,
Aug 16, 2022, 2:04:56 AM8/16/22
to v8-re...@googlegroups.com

Comment #21 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c21


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/f4588f070f2f20f7f9d430df14d2949a22e8ad71

commit f4588f070f2f20f7f9d430df14d2949a22e8ad71
Author: Andreas Haas <ah...@chromium.org>
Date: Mon Aug 08 13:49:01 2022

[wasm] Add --no-wasm-lazy-compilation to stress

Once lazy compilation lands we want to continue testing the eager
compilation configuration. For that we add --no-wasm-lazy-compilation to
the "stress" variant.

Bug: v8:12852
Change-Id: I1777aaeb1c8cec0359128ed4b3d34a21aa3ce37e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810249
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82470}

[modify] https://crrev.com/f4588f070f2f20f7f9d430df14d2949a22e8ad71/tools/testrunner/local/variants.py

cleme… via monorail

unread,
Sep 16, 2022, 9:41:27 AM9/16/22
to v8-re...@googlegroups.com
Updates:
Cc: clem...@chromium.org

Comment #23 on issue 12852 by clem...@chromium.org: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c23

(No comment was entered for this change.)

Git Watcher via monorail

unread,
Oct 6, 2022, 12:07:12 PM10/6/22
to v8-re...@googlegroups.com

Comment #24 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c24


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/3831cde2d6f7e990cd652f24dfce214e7851062e

commit 3831cde2d6f7e990cd652f24dfce214e7851062e
Author: Clemens Backes <clem...@chromium.org>
Date: Thu Oct 06 15:26:46 2022

[wasm] Always save NativeModule to the stack

Getting the NativeModule is cheap enough that we should just always do
it. This makes the code simpler by avoiding an output parameter for
{wasm::CompileLazy}.

R=jkum...@chromium.org

Bug: v8:12852
Change-Id: I8feebb7f7a95d17640b1cf8aeee5ec6d020624b7
Cq-Include-Trybots: luci.v8.try:v8_linux64_gc_stress_dbg_ng
Cq-Include-Trybots: luci.v8.try:v8_linux_gc_stress_dbg_ng
Cq-Include-Trybots: luci.v8.try:v8_mac64_gc_stress_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899010
Commit-Queue: Clemens Backes <clem...@chromium.org>
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83564}

[modify] https://crrev.com/3831cde2d6f7e990cd652f24dfce214e7851062e/src/wasm/module-compiler.cc
[modify] https://crrev.com/3831cde2d6f7e990cd652f24dfce214e7851062e/src/wasm/module-compiler.h
[modify] https://crrev.com/3831cde2d6f7e990cd652f24dfce214e7851062e/src/execution/frames.cc
[modify] https://crrev.com/3831cde2d6f7e990cd652f24dfce214e7851062e/src/runtime/runtime-wasm.cc

Git Watcher via monorail

unread,
Oct 10, 2022, 11:34:17 AM10/10/22
to v8-re...@googlegroups.com

Comment #26 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c26


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/4804c4de313c2e5e41407518a97f61abf8d33331

commit 4804c4de313c2e5e41407518a97f61abf8d33331
Author: Jakob Kummerow <jkum...@chromium.org>
Date: Mon Oct 10 14:37:34 2022

[wasm] Allocate feedback vectors on demand

We previously allocated feedback vectors when instantiating the module,
or when lazily compiling a function. That's not sufficient when there
are multiple instances of the same NativeModule, or when we eagerly
tier-down all code for debugging. This patch changes the "get vector from
instance" sequence at the beginning of every Liftoff function to "get
or allocate vector"; factored into a builtin call to avoid generating
more code for every function.

Bug: v8:12852
Change-Id: I12ab96dc9575f5dff089147af1bf9b280616892d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3939667
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Jakob Kummerow <jkum...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83610}

[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/builtins/x64/builtins-x64.cc
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/runtime/runtime.h
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/builtins/arm64/builtins-arm64.cc
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/wasm/baseline/liftoff-assembler-defs.h
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/wasm/module-compiler.cc
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/builtins/arm/builtins-arm.cc
[add] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/test/mjsunit/wasm/lazy-feedback-vector-allocation.js
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/builtins/builtins-definitions.h
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/builtins/ia32/builtins-ia32.cc
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/runtime/runtime-wasm.cc
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/wasm/module-instantiate.cc
[modify] https://crrev.com/4804c4de313c2e5e41407518a97f61abf8d33331/src/wasm/wasm-code-manager.h

cleme… via monorail

unread,
Oct 10, 2022, 11:37:49 AM10/10/22
to v8-re...@googlegroups.com
Updates:
Cc: jkum...@chromium.org ah...@chromium.org

Comment #27 on issue 12852 by clem...@chromium.org: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c27

Issue 13288 has been merged into this issue.

Git Watcher via monorail

unread,
Oct 10, 2022, 4:34:07 PM10/10/22
to v8-re...@googlegroups.com

Comment #28 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c28


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/477c7c58155f2497d30d38c03b1e4e638b214c08

commit 477c7c58155f2497d30d38c03b1e4e638b214c08
Author: Shu-yu Guo <s...@chromium.org>
Date: Mon Oct 10 19:28:29 2022

Revert "[wasm] Allocate feedback vectors on demand"

This reverts commit 4804c4de313c2e5e41407518a97f61abf8d33331.

Reason for revert: GC stress failure:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20gc%20stress/1075/overview

Original change's description:

> [wasm] Allocate feedback vectors on demand
>
> We previously allocated feedback vectors when instantiating the module,
> or when lazily compiling a function. That's not sufficient when there
> are multiple instances of the same NativeModule, or when we eagerly
> tier-down all code for debugging. This patch changes the "get vector from
> instance" sequence at the beginning of every Liftoff function to "get
> or allocate vector"; factored into a builtin call to avoid generating
> more code for every function.
>
> Bug: v8:12852
> Change-Id: I12ab96dc9575f5dff089147af1bf9b280616892d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3939667
> Reviewed-by: Clemens Backes <clem...@chromium.org>
> Commit-Queue: Jakob Kummerow <jkum...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83610}

Bug: v8:12852
Change-Id: I200118185f265da7dd0956bbd5a45a4d40e4bbc0

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3943126
Owners-Override: Shu-yu Guo <s...@chromium.org>
Bot-Commit: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Commit-Queue: Shu-yu Guo <s...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83617}

[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/builtins/x64/builtins-x64.cc
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/runtime/runtime.h
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/builtins/arm64/builtins-arm64.cc
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/wasm/baseline/liftoff-assembler-defs.h
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/wasm/module-compiler.cc
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/builtins/arm/builtins-arm.cc
[delete] https://crrev.com/3dea5aea0aa95a6c7d5707a5b03e75c756b967c4/test/mjsunit/wasm/lazy-feedback-vector-allocation.js
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/builtins/builtins-definitions.h
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/builtins/ia32/builtins-ia32.cc
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/runtime/runtime-wasm.cc
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/wasm/module-instantiate.cc
[modify] https://crrev.com/477c7c58155f2497d30d38c03b1e4e638b214c08/src/wasm/wasm-code-manager.h

Git Watcher via monorail

unread,
Oct 19, 2022, 7:48:15 AM10/19/22
to v8-re...@googlegroups.com

Comment #29 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c29


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/a02c56694fd5e0c64072293040e51837204c7955

commit a02c56694fd5e0c64072293040e51837204c7955
Author: Jakob Kummerow <jkum...@chromium.org>
Date: Wed Oct 19 09:59:44 2022

Reland "[wasm] Allocate feedback vectors on demand"

This is a reland of commit 4804c4de313c2e5e41407518a97f61abf8d33331.

There are major changes since the previous attempt:
- The WasmLiftoffFrameSetup (formerly WasmGetFeedbackVector) builtin
now performs as much of the frame setup work as possible, to reduce
generated code size for each function.
- The WasmLazyCompile builtin/runtime function no longer allocates,
hence gets frame type INTERNAL, and is un-handlified.


Original change's description:
> [wasm] Allocate feedback vectors on demand
>
> We previously allocated feedback vectors when instantiating the module,
> or when lazily compiling a function. That's not sufficient when there
> are multiple instances of the same NativeModule, or when we eagerly
> tier-down all code for debugging. This patch changes the "get vector from
> instance" sequence at the beginning of every Liftoff function to "get
> or allocate vector"; factored into a builtin call to avoid generating
> more code for every function.
>

> Cr-Commit-Position: refs/heads/main@{#83610}

Bug: v8:12852
Change-Id: I58a6a02a55c3e29cae3cbdafad6cf81487faccbe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3942206
Auto-Submit: Jakob Kummerow <jkum...@chromium.org>

Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Jakob Kummerow <jkum...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83794}

[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/execution/arm64/frame-constants-arm64.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/baseline/ia32/liftoff-assembler-ia32.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/builtins/x64/builtins-x64.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/baseline/x64/liftoff-assembler-x64.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/baseline/arm64/liftoff-assembler-arm64.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/builtins/arm64/builtins-arm64.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/execution/isolate.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/module-compiler.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/builtins/arm/builtins-arm.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/execution/arm/frame-constants-arm.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/execution/frames.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/builtins/builtins-definitions.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/runtime/runtime-wasm.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/execution/x64/frame-constants-x64.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/module-instantiate.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/wasm-code-manager.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/baseline/liftoff-assembler.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/runtime/runtime.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/baseline/liftoff-assembler-defs.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/tools/v8heapconst.py
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/module-compiler.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/execution/ia32/frame-constants-ia32.h
[add] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/test/mjsunit/wasm/lazy-feedback-vector-allocation.js
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/wasm/baseline/arm/liftoff-assembler-arm.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/objects/code-inl.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/execution/frames.h
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/builtins/ia32/builtins-ia32.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/codegen/arm64/macro-assembler-arm64.cc
[modify] https://crrev.com/a02c56694fd5e0c64072293040e51837204c7955/src/execution/frames-inl.h

Git Watcher via monorail

unread,
Oct 20, 2022, 11:07:18 PM10/20/22
to v8-re...@googlegroups.com

Comment #30 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c30


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/c8b6657b72927af810ee65ed82e32d5614da1886

commit c8b6657b72927af810ee65ed82e32d5614da1886
Author: Liu Yu <li...@loongson.cn>
Date: Thu Oct 20 12:48:50 2022

[loong64][mips64][wasm] Allocate feedback vectors on demand

Port commit a02c56694fd5e0c64072293040e51837204c7955

Bug: v8:12852
Change-Id: I9cd9014ac6a5bf65664a342c068e7a2796d11d45
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3968013
Commit-Queue: Zhao Jiazhong <zhaojia...@loongson.cn>
Auto-Submit: Liu Yu <li...@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojia...@loongson.cn>
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83834}

[modify] https://crrev.com/c8b6657b72927af810ee65ed82e32d5614da1886/src/wasm/baseline/liftoff-assembler-defs.h
[modify] https://crrev.com/c8b6657b72927af810ee65ed82e32d5614da1886/src/codegen/mips64/macro-assembler-mips64.cc
[modify] https://crrev.com/c8b6657b72927af810ee65ed82e32d5614da1886/src/execution/mips64/frame-constants-mips64.h
[modify] https://crrev.com/c8b6657b72927af810ee65ed82e32d5614da1886/src/wasm/baseline/mips64/liftoff-assembler-mips64.h
[modify] https://crrev.com/c8b6657b72927af810ee65ed82e32d5614da1886/src/execution/loong64/frame-constants-loong64.h
[modify] https://crrev.com/c8b6657b72927af810ee65ed82e32d5614da1886/src/builtins/loong64/builtins-loong64.cc
[modify] https://crrev.com/c8b6657b72927af810ee65ed82e32d5614da1886/src/builtins/mips64/builtins-mips64.cc
[modify] https://crrev.com/c8b6657b72927af810ee65ed82e32d5614da1886/src/codegen/loong64/macro-assembler-loong64.cc
[modify] https://crrev.com/c8b6657b72927af810ee65ed82e32d5614da1886/src/wasm/baseline/loong64/liftoff-assembler-loong64.h

Git Watcher via monorail

unread,
Oct 21, 2022, 9:12:15 AM10/21/22
to v8-re...@googlegroups.com

Comment #31 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c31


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/5d7bbeb5ec84259a618d98926106de7a5ad5aa9a

commit 5d7bbeb5ec84259a618d98926106de7a5ad5aa9a
Author: Lu Yahan <ya...@iscas.ac.cn>
Date: Fri Oct 21 11:19:00 2022

[riscv][wasm] Allocate feedback vectors on demand


Port commit a02c56694fd5e0c64072293040e51837204c7955

Bug: v8:12852

Change-Id: Id93e2c3550d677f7d5dad32de085cb73ff02b301
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3971517
Commit-Queue: ji qiu <qi...@iscas.ac.cn>
Reviewed-by: ji qiu <qi...@iscas.ac.cn>
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83852}

[modify] https://crrev.com/5d7bbeb5ec84259a618d98926106de7a5ad5aa9a/src/wasm/baseline/liftoff-assembler-defs.h
[modify] https://crrev.com/5d7bbeb5ec84259a618d98926106de7a5ad5aa9a/src/execution/riscv/frame-constants-riscv.h
[modify] https://crrev.com/5d7bbeb5ec84259a618d98926106de7a5ad5aa9a/src/wasm/baseline/riscv/liftoff-assembler-riscv.h
[modify] https://crrev.com/5d7bbeb5ec84259a618d98926106de7a5ad5aa9a/src/wasm/baseline/riscv/liftoff-assembler-riscv32.h
[modify] https://crrev.com/5d7bbeb5ec84259a618d98926106de7a5ad5aa9a/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h
[modify] https://crrev.com/5d7bbeb5ec84259a618d98926106de7a5ad5aa9a/src/codegen/riscv/macro-assembler-riscv.cc
[modify] https://crrev.com/5d7bbeb5ec84259a618d98926106de7a5ad5aa9a/src/builtins/riscv/builtins-riscv.cc

Git Watcher via monorail

unread,
Nov 11, 2022, 8:10:17 AM11/11/22
to v8-re...@googlegroups.com

Comment #32 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c32


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/3bccdeb1745aae16dd61cf5d31a3961052a301b8

commit 3bccdeb1745aae16dd61cf5d31a3961052a301b8
Author: Andreas Haas <ah...@chromium.org>
Date: Thu Nov 10 16:07:17 2022

[wasm][capi] Reset context in v8_callback

When the c-api gets called back from WebAssembly, the context set in the
isolate may not be valid. It is therefore necessary to set the context
when the c-api gets entered from WebAssembly.

R=jkum...@chromium.org

Bug: v8:12852
Change-Id: I279c22bbfb2468133732b611e1bdf00f04807e0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020382
Commit-Queue: Andreas Haas <ah...@chromium.org>
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84206}

[modify] https://crrev.com/3bccdeb1745aae16dd61cf5d31a3961052a301b8/src/wasm/c-api.cc

Git Watcher via monorail

unread,
Nov 11, 2022, 2:13:07 PM11/11/22
to v8-re...@googlegroups.com

Comment #33 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c33


The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/00ad2328a7e646237d08039d894fd568738d21a0

commit 00ad2328a7e646237d08039d894fd568738d21a0
Author: Andreas Haas <ah...@chromium.org>
Date: Fri Nov 11 19:12:53 2022

[v8][wasm] Enable lazy compilation by default

Bug: v8:12852
Change-Id: I858668033f981af5ae01c1a92fc21256ad0e9806
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4023373
Commit-Queue: John Abd-El-Malek <j...@chromium.org>
Auto-Submit: Andreas Haas <ah...@chromium.org>
Reviewed-by: John Abd-El-Malek <j...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1070408}

[modify] https://crrev.com/00ad2328a7e646237d08039d894fd568738d21a0/content/public/common/content_features.cc

Git Watcher via monorail

unread,
Nov 14, 2022, 4:24:07 AM11/14/22
to v8-re...@googlegroups.com

Comment #34 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c34


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/29131d5e3ea9cbfeae3e6dc3fd6c4439f0ac4bde

commit 29131d5e3ea9cbfeae3e6dc3fd6c4439f0ac4bde
Author: Andreas Haas <ah...@chromium.org>
Date: Thu Nov 10 08:14:39 2022


[wasm] Enable lazy compilation by default

R=clem...@chromium.org

Bug: v8:12852
Change-Id: I83f579cad4eb8ceeb7a9a392941bd9d65d18891d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4016717
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84231}

[modify] https://crrev.com/29131d5e3ea9cbfeae3e6dc3fd6c4439f0ac4bde/src/flags/flag-definitions.h

Git Watcher via monorail

unread,
Nov 15, 2022, 5:49:16 AM11/15/22
to v8-re...@googlegroups.com

Comment #35 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c35


The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/34a0f87d5bdfc91a2113ae8e24bba41b459a5c52

commit 34a0f87d5bdfc91a2113ae8e24bba41b459a5c52
Author: Andreas Haas <ah...@chromium.org>
Date: Tue Nov 15 10:48:05 2022

[v8][wasm] Clean up after the lazy compilation finch trial

Bug: v8:12852
Change-Id: I7a877d87838fa215bf7f260cd569432568d76bd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4027942
Reviewed-by: Michael Lippautz <mlip...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1071526}

[modify] https://crrev.com/34a0f87d5bdfc91a2113ae8e24bba41b459a5c52/testing/variations/fieldtrial_testing_config.json

Git Watcher via monorail

unread,
Nov 16, 2022, 6:43:18 AM11/16/22
to v8-re...@googlegroups.com

Comment #36 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c36


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/63fc14c68b1bc063af58abd8b25e3fde6f3f53a8

commit 63fc14c68b1bc063af58abd8b25e3fde6f3f53a8
Author: Andreas Haas <ah...@chromium.org>
Date: Tue Nov 15 07:45:04 2022

[wasm] Add --no-wasm-lazy-compilation to nooptimization

With shipping lazy compilation, we lose the test coverage for eager
compilation. This is bad, because with PGO, eager compilation may have
a comeback. With this CL we enable eager compilation in the
nooptimization test variant. This variant seems to be the best fit, as
there are no conflicts with existing flags. The --liftoff flag is not a
problem, because Liftoff was anyways the default for eager compilation.

R=clem...@chromium.org

Bug: v8:12852
Change-Id: I002ecb2a31ad2e2335a0469fdf5e3d5bda3b33bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027004
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84294}

[modify] https://crrev.com/63fc14c68b1bc063af58abd8b25e3fde6f3f53a8/tools/testrunner/local/variants.py

Git Watcher via monorail

unread,
Nov 16, 2022, 8:05:25 AM11/16/22
to v8-re...@googlegroups.com

Comment #37 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c37


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/3af74a2e0417ed3eaf752d28deb7c5db57466bc1

commit 3af74a2e0417ed3eaf752d28deb7c5db57466bc1
Author: Clemens Backes <clem...@chromium.org>
Date: Wed Nov 16 12:12:34 2022

[wasm] Disable write protection by default

Now that lazy compilation is shipped, we effectively overwrite the
default (true) via the weak negative implication anyway. Hence switch
the default to false to avoid confusion.

R=ah...@chromium.org

Bug: v8:12852
Change-Id: Idd662992930db8a5df565b967a6820d662681ec6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030480
Reviewed-by: Andreas Haas <ah...@chromium.org>
Commit-Queue: Clemens Backes <clem...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84297}

[modify] https://crrev.com/3af74a2e0417ed3eaf752d28deb7c5db57466bc1/src/flags/flag-definitions.h

Git Watcher via monorail

unread,
Nov 16, 2022, 2:51:06 PM11/16/22
to v8-re...@googlegroups.com

Comment #38 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c38


The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/9a483611c595d3665abb24b00a2405693f92adf1

commit 9a483611c595d3665abb24b00a2405693f92adf1
Author: Clemens Backes <clem...@chromium.org>
Date: Wed Nov 16 19:50:42 2022

[v8] Disable Wasm code protection by default

V8 has an implication that makes lazy compilation disable mprotect-based
code protection (see https://crrev.com/c/3627596).
This implication is ignored in Chrome though since the flag is currently
explicitly enabled. Since lazy compilation is now enabled by default
(https://crrev.com/c/4023373), we should disable code protection.

Note that protection via PKU (which is much stronger and faster) is
still enabled.

R=ah...@chromium.org, j...@chromium.org

Bug: v8:12852
Change-Id: I55c0959ecdc85aa2253f40f443ce85a449adb4a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4023869
Auto-Submit: Clemens Backes <clem...@chromium.org>
Reviewed-by: John Abd-El-Malek <j...@chromium.org>
Commit-Queue: John Abd-El-Malek <j...@chromium.org>
Reviewed-by: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1072399}

[modify] https://crrev.com/9a483611c595d3665abb24b00a2405693f92adf1/content/public/common/content_features.cc

Git Watcher via monorail

unread,
Nov 22, 2022, 1:54:10 PM11/22/22
to v8-re...@googlegroups.com
Updates:
Labels: merge-merged-5414 merge-merged-109

Comment #39 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c39


The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/d5991102e2d008a7bb9a5f77fd72fcee9fb5bd44

commit d5991102e2d008a7bb9a5f77fd72fcee9fb5bd44
Author: Clemens Backes <clem...@chromium.org>
Date: Tue Nov 22 18:53:50 2022

Merged: [v8] Disable Wasm code protection by default


V8 has an implication that makes lazy compilation disable mprotect-based
code protection (see https://crrev.com/c/3627596).
This implication is ignored in Chrome though since the flag is currently
explicitly enabled. Since lazy compilation is now enabled by default
(https://crrev.com/c/4023373), we should disable code protection.

Note that protection via PKU (which is much stronger and faster) is
still enabled.

R=ah...@chromium.org, j...@chromium.org

(cherry picked from commit 9a483611c595d3665abb24b00a2405693f92adf1)

Bug: v8:12852, chromium:1386183
Change-Id: Ia052eb53b785fa350faf9d812eab49fc8fd1abd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4047782
Bot-Commit: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>

Reviewed-by: Andreas Haas <ah...@chromium.org>
Commit-Queue: Clemens Backes <clem...@chromium.org>
Reviewed-by: Alexander Timin <alt...@chromium.org>
Auto-Submit: Clemens Backes <clem...@chromium.org>
Cr-Commit-Position: refs/branch-heads/5414@{#184}
Cr-Branched-From: 4417ee59d7bf6df7a9c9ea28f7722d2ee6203413-refs/heads/main@{#1070088}

[modify] https://crrev.com/d5991102e2d008a7bb9a5f77fd72fcee9fb5bd44/content/public/common/content_features.cc

Git Watcher via monorail

unread,
Nov 28, 2022, 4:12:20 PM11/28/22
to v8-re...@googlegroups.com
Updates:
Labels: merge-merged-5359 merge-merged-108

Comment #40 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c40


The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/b3d801b4d48214b21e7fdd5d62d35c76a22749ea

commit b3d801b4d48214b21e7fdd5d62d35c76a22749ea
Author: Clemens Backes <clem...@chromium.org>
Date: Mon Nov 28 21:11:49 2022


[v8] Disable Wasm code protection by default

V8 has an implication that makes lazy compilation disable mprotect-based
code protection (see https://crrev.com/c/3627596).
This implication is ignored in Chrome though since the flag is currently
explicitly enabled. Since lazy compilation is now enabled by default
(https://crrev.com/c/4023373), we should disable code protection.

Note that protection via PKU (which is much stronger and faster) is
still enabled.

R=​ah...@chromium.org, j...@chromium.org

(cherry picked from commit 9a483611c595d3665abb24b00a2405693f92adf1)

Bug: v8:12852
Change-Id: I55c0959ecdc85aa2253f40f443ce85a449adb4a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4023869
Auto-Submit: Clemens Backes <clem...@chromium.org>
Reviewed-by: John Abd-El-Malek <j...@chromium.org>
Commit-Queue: John Abd-El-Malek <j...@chromium.org>
Reviewed-by: Andreas Haas <ah...@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1072399}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061295
Reviewed-by: Prudhvikumar Bommana <pbom...@google.com>
Commit-Queue: Prudhvikumar Bommana <pbom...@google.com>
Owners-Override: Prudhvikumar Bommana <pbom...@google.com>
Commit-Queue: Srinivas Sista <sriniv...@chromium.org>
Cr-Commit-Position: refs/branch-heads/5359@{#1014}
Cr-Branched-From: 27d3765d341b09369006d030f83f582a29eb57ae-refs/heads/main@{#1058933}

[modify] https://crrev.com/b3d801b4d48214b21e7fdd5d62d35c76a22749ea/content/public/common/content_features.cc

Git Watcher via monorail

unread,
Dec 5, 2022, 5:46:08 AM12/5/22
to v8-re...@googlegroups.com

Comment #41 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c41


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/a2a907244a64a4572b9fe91e3c12b0f79bda01b0

commit a2a907244a64a4572b9fe91e3c12b0f79bda01b0
Author: Clemens Backes <clem...@chromium.org>
Date: Fri Dec 02 15:14:29 2022

[wasm] Remove V8.WasmModuleCodeSizeBaselineMiB counter

The chromium-side histogram is being deprecated in
https://crrev.com/c/4076250.
This CL removes the v8-side counter together with the `kAfterBaseline`
sampling mode.

R=ah...@chromium.org

Bug: v8:12852
Change-Id: If7960824264dfc7e99e0c5c436de1dca90fbce4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4076167

Reviewed-by: Andreas Haas <ah...@chromium.org>
Commit-Queue: Clemens Backes <clem...@chromium.org>

Git Watcher via monorail

unread,
Dec 5, 2022, 6:20:17 AM12/5/22
to v8-re...@googlegroups.com

Comment #42 on issue 12852 by Git Watcher: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c42


The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/84f55b559029024ea18aa401e50e580015905073

commit 84f55b559029024ea18aa401e50e580015905073
Author: Clemens Backes <clem...@chromium.org>
Date: Mon Dec 05 11:19:03 2022

Deprecate V8.WasmModuleCodeSizeBaselineMiB histogram

With lazy compilation, "baseline compilation finished" does not happen
any more, so the histogram does not get reasonable samples any more.

R=mlip...@chromium.org
CC=ah...@chromium.org

Bug: v8:12852
Change-Id: Iac47fa76c6328f6731a18f18ffcddb62cc82d325
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4076250
Reviewed-by: Michael Lippautz <mlip...@chromium.org>

Reviewed-by: Andreas Haas <ah...@chromium.org>
Commit-Queue: Clemens Backes <clem...@chromium.org>

ah… via monorail

unread,
Dec 12, 2023, 1:53:30 AM12/12/23
to v8-re...@googlegroups.com
Updates:
Status: Fixed

Comment #43 on issue 12852 by ah...@chromium.org: Tracking bug: lazy compilation for WebAssembly
https://bugs.chromium.org/p/v8/issues/detail?id=12852#c43


(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages