- 25 May, 2020 1 commit
-
-
Andreas Haas authored
This CL introduces the SyncStreamingDecoder to support streaming compilation when --single-threaded is set. The SyncStreamingDecoder buffers all bytes it receives over {OnBytesReceived}, and compiles them synchronously upon {Finish}. In addition to introducing SyncStreamingDecoder, this CL does the following changes: * Redirect streaming compilation to the new streaming decoder if --no-wasm-async-compilation is set. This flag is set if --single-threaded is set. * Extend the test-streaming-compilation.cc tests to test also the new streaming decoder. R=thibaudm@chromium.org Bug: v8:10548 Change-Id: I807e291a6060067c9835de4adf82bcb00321d995 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209053 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#67955}
-
- 20 May, 2020 1 commit
-
-
Andreas Haas authored
The implementation of the StreamingDecoder depends on async compilation. However, when the --single-threaded flag is set, async compilation is not available. Therefore V8 does not support streaming compilation at the moment if the --single-threaded flag is set. This CL is the first step to support streaming compilation in --single-threaded mode. This CL makes the StreamingDecoder an abstract class, and the current implementation a sub-class called AsyncStreamingDecoder. A follow-up CL will provided a second sub-class implementation for streaming compilation in --single-threaded mode. Bug: v8:10548 Change-Id: Ice5c01340d3df18f836a4a05d30571207ca8ccf6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2208869 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#67931}
-
- 10 Dec, 2019 1 commit
-
-
Thibaud Michaud authored
Add a method to set the URL of a Wasm script from a WasmStreaming object. This will allow devtools to report the actual URL when it is available. R=clemensb@chromium.org Bug: v8:9762 Change-Id: Iccd41d76c9a4a2e1858716e8d555782404719faa Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1944153Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#65405}
-
- 08 Nov, 2019 1 commit
-
-
Clemens Backes authored
In streaming compilation, we were computing a way too low code size estimate, since all {WasmFunction::code} fields were still zero when we were calling {EstimateNativeModuleCodeSize}. This lead to many separate code spaces being created during compilation, creating significant performance and memory overhead. This CL fixes this by passing the code section length when creating the {NativeModule}. From this, we can compute the code size estimate just as before. Drive-by: Rename "functions_count" to "num_functions" in {ProcessCodeSectionHeader} to be consistent with the declaration. R=ahaas@chromium.org Bug: v8:9950 Change-Id: I30a54c01ed24d0dfecb8a4b6d123015f1803ddeb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903439 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#64849}
-
- 23 May, 2019 1 commit
-
-
Yang Guo authored
NOPRESUBMIT=true TBR=mstarzinger@chromium.org Bug: v8:9247 Change-Id: I4cd6b79a1c2cba944f6f23caed59d4f1a4ee358b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624217 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#61790}
-
- 03 Apr, 2019 1 commit
-
-
Clemens Hammacher authored
All standard containers provide a method named {empty} to check whether the container is empty. On {base::Vector}, that method is named {is_empty}, while {empty} is an unused factory method for creating an empty {Vector}. This CL renames {is_empty} to {empty} and removes the unused factory method. R=leszeks@chromium.org Bug: v8:8834 Change-Id: I686bd07527801fbe783c412bc241221d8ec3660a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547862 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#60584}
-
- 28 Feb, 2019 1 commit
-
-
Clemens Hammacher authored
We sometimes store function indexes and number of functions as {size_t} and sometimes as {int}. Unify a few places to be {int}. R=ahaas@chromium.org Change-Id: I1d204cbd9388245f97f291a469b32743457ab2c0 Reviewed-on: https://chromium-review.googlesource.com/c/1491607Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#59946}
-
- 26 Feb, 2019 1 commit
-
-
Michael Starzinger authored
R=ahaas@chromium.org TEST=mjsunit/regress/wasm/regress-935138 BUG=chromium:935138 Change-Id: I73465e0edcdfcd33b96764ffaf5f33519e424bb8 Reviewed-on: https://chromium-review.googlesource.com/c/1486471 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#59852}
-
- 19 Feb, 2019 1 commit
-
-
Michael Starzinger authored
This removes an outdated section order check from {CreateNewBuffer} and relies solely on the checks done in {ProcessSection}. Those checks are more comprehensive and will remain coherent with synchronous decoding. R=ahaas@chromium.org TEST=mjsunit/regress/wasm/regress-8846 BUG=v8:8846 Change-Id: Id0cdc3bf3ad78f7970c9fceff66a17ab20f4666b Reviewed-on: https://chromium-review.googlesource.com/c/1477211Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#59702}
-
- 15 Jan, 2019 1 commit
-
-
Clemens Hammacher authored
We often use ResultBase or VoidResult to store or pass wasm errors (errors with locations). This CL extracts a WasmError class which can store an error (can also be empty), and Result<T> which stores an error or a T (exactly one of them). R=titzer@chromium.org Bug: v8:8689 Change-Id: I3f5203559984a0ae8757e0130a9184957fa28df5 Reviewed-on: https://chromium-review.googlesource.com/c/1409365 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#58827}
-
- 10 Jan, 2019 1 commit
-
-
Andreas Haas authored
Originally, the NativeModule and the WasmModuleObject were created together, and the streaming decoder was notified after the WasmModuleObject was created. A recent CL (https://crrev.com/c/1402544), however, changed that. The NativeModule gets created before compilation starts, the WasmModuleObject, however, gets created after compilation. The streaming decoder only needs the NativeModule to register a callback before compilation. Therefore this CL we change the notification of the streaming decoder to receive only the NativeModule, not the WasmModuleObject, before starting compilation. R=clemensh@chromium.org CC=bbudge@chromium.org Bug: chromium:719172 Change-Id: I4ad879e4ebd2d88174d7e2a0c6359f2836926763 Reviewed-on: https://chromium-review.googlesource.com/c/1404442 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#58703}
-
- 11 Dec, 2018 1 commit
-
-
Clemens Hammacher authored
The AsyncCompileJob should be decoupled from tiering, hence the top-tier-finished callback should not be delivered via the AsyncCompileJob. Instead, store it directly on the CompilationState. R=ahaas@chromium.org Bug: v8:8050, v8:7921, chromium:912031 Change-Id: Iebd64655667a8078c34caea4edeb6cf5f40833fd Reviewed-on: https://chromium-review.googlesource.com/c/1371604Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#58165}
-
- 12 Nov, 2018 1 commit
-
-
Clemens Hammacher authored
After the first decoder error, the streaming processor should not be called again. To enforce this, reset the {processor_} field. This also makes the {ok_} field redundant. Note that this refactoring is also necessary for a future CL which makes the {StreamingProcessor} keep the {AsyncCompileJob} alive. By resetting the processor, we also remove that link. R=ahaas@chromium.org Bug: v8:7921 Change-Id: I42f5ed26a8f26c3dc8db5676557a0d82021e132e Reviewed-on: https://chromium-review.googlesource.com/c/1329179 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#57435}
-
- 07 Nov, 2018 1 commit
-
-
Clemens Hammacher authored
Compilation units currently contain pointers into allocated space that contains the code of the respective function. This requires us to keep the StreamingDecoder alive as long as compilation is still running (including tiering). This CL refactors this by having an additional redirection (WireBytesStorage) which can point to either the StreamingDecoder or the NativeModule. We only keep the code section buffer alive as long as the StreamingWireBytesStorage is still in use. I will further refactor memory ownership in a follow-up CL to not make the AsyncCompileJob keep the StreamingDecoder alive. R=ahaas@chromium.org Bug: v8:8343,v8:7921,v8:8050 Change-Id: I780582c3217abf64000454f2c9c108b9ac9fbff1 Reviewed-on: https://chromium-review.googlesource.com/c/1319588Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57317}
-
- 06 Nov, 2018 1 commit
-
-
Clemens Hammacher authored
Instead of passing and storing uint8_t* and size_t, we now more often store a Vector or OwnedVector, which encapsulates these two fields. This provides some more DCHECKs which happen automatically when getting a subvector into the buffer. Drive-by: More refactorings and removals of unneeded or rarely used helper methods. R=ahaas@chromium.org Bug: v8:8238 Change-Id: I1b24f90f1517fc50360854f46c2d001075544858 Reviewed-on: https://chromium-review.googlesource.com/c/1317817 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#57263}
-
- 05 Nov, 2018 1 commit
-
-
Clemens Hammacher authored
R=ahaas@chromium.org Bug: v8:8238, v8:7490 Change-Id: I27a57a43ad767d77e64764eda1d9017db87bdfcb Reviewed-on: https://chromium-review.googlesource.com/c/1317588Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57237}
-
- 22 Oct, 2018 1 commit
-
-
Clemens Hammacher authored
This removes the {error} and {verror} methods of {ResultBase} and introduces a named constructor {Error} instead. This allows to construct an error result in a single expression, and moves {Result} closer to a container that is initialized once and is immutable afterwards (just the {MoveErrorFrom} method is still violating this pattern). R=titzer@chromium.org Bug: v8:8238 Change-Id: Iec16c8c6d66300ee82a48e8a9e941c72ae26e202 Reviewed-on: https://chromium-review.googlesource.com/c/1293370 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#56857}
-
- 12 Oct, 2018 1 commit
-
-
Bill Budge authored
- Adds embedder callback to notify fully tiered compilation is finished, returning a WasmCompiledModule for serialization. - Adds function to pass previously compiled bytes into WASM streaming compilation, for deserialization. - Plumbs this API through StreamingDecoder. Bug: chromium:719172 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: Ibe376f3a8ccfa90fda730ef4ff6628a1532da45c Reviewed-on: https://chromium-review.googlesource.com/c/1252884Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Bill Budge <bbudge@chromium.org> Cr-Commit-Position: refs/heads/master@{#56617}
-
- 25 Sep, 2018 1 commit
-
-
Andreas Haas authored
The lifetime of the AsyncCompileJob does not depend on the lifetime of the stream which feeds data into it. Multiple checks guarantee that the AsyncCompileJob still exists when the stream wants to call it. With this CL we add an additional level of defense to make sure that streaming does not continue after the AsyncCompileJob got destructed. It is not clear if this CL fixes the bug referenced below. However, the crashes there could be caused when streaming accesses the AsyncCompileJob after it got destructed already. I was not able though to find a scenario where this is possible. R=clemensh@chromium.org Bug: chromium:888170 Change-Id: Id5c6cc34842735a3adaf3e09c57cbe923cfc2630 Reviewed-on: https://chromium-review.googlesource.com/1241961 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#56213}
-
- 28 Jun, 2018 1 commit
-
-
Clemens Hammacher authored
Another pair of {std::unique_ptr} and {size_t} that can be stored as one {OwnedVector}, which allows to pass it as one thing. R=mstarzinger@chromium.org Bug: v8:7754 Change-Id: Ideac0dbd390ba8147b6620daa86f0d3da6c3b609 Reviewed-on: https://chromium-review.googlesource.com/1118236 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#54091}
-
- 21 Nov, 2017 1 commit
-
-
Andreas Haas authored
R=clemensh@chromium.org Change-Id: Ifb5c02698b5ad9189283e227e89fa020f92186a8 Reviewed-on: https://chromium-review.googlesource.com/781720Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#49525}
-
- 05 Oct, 2017 1 commit
-
-
Andreas Haas authored
At the moment we check only in the module-decoder if the sections in a module appear at most once. The code section, however, we process already before this check. With this CL we check that there is at most one code section before we start processing it. R=clemensh@chromium.org TEST=WasmStreamingDecoderTest.TwoCodeSections Bug: chromium:771916 Change-Id: Icc79d5a87ab39f450a35c688f74ea5e67cae4b3c Reviewed-on: https://chromium-review.googlesource.com/702379Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#48314}
-
- 15 Sep, 2017 1 commit
-
-
Andreas Haas authored
In this CL I implement streaming compilation for WebAssembly, as described in the design doc I have sent out already. In this implementation the decoding of sections other than the code section is done immediately on the foreground thread. Eventually all decoding should happen in the background. I think it is acceptable to do the decoding on the foreground thread for now because I have finished it already, and decoding in the background would add even more complexity to this CL. Bug:v8:6785 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I285e1e5e1a5a243113c92571b25ee9bae551d0ed Reviewed-on: https://chromium-review.googlesource.com/631721Reviewed-by: Mircea Trofin <mtrofin@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#48022}
-
- 11 May, 2017 1 commit
-
-
Andreas Haas authored
This CL implements a streaming decoder which takes the bytes of a wasm module as an input, potentially split into multiple chunks, and decodes them into segments. Each segment either contains the payload of a whole section, or the code of a single function. The goal is that the streaming decoder is used for streaming compilation. That's where the interface comes from, see (https://cs.chromium.org/chromium/src/v8/include/v8.h?q=OnBytesReceived&sq=package:chromium&l=4060) Error positions are not reported correctly at the moment. I plan to do this in a separate CL. Change-Id: I6e3df6a91945c7baec2dc4f5de2e5f47636083df Reviewed-on: https://chromium-review.googlesource.com/471350 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Mircea Trofin <mtrofin@chromium.org> Cr-Commit-Position: refs/heads/master@{#45250}
-