- 21 Jan, 2019 1 commit
-
-
Clemens Hammacher authored
This is a reland of 4e1d7c87. Failure on arm and arm64 is fixed by https://crrev.com/c/1411885. Original change's description: > [wasm] Split compilation in three stages > > In order to refactor ownership between objects in wasm compilation, the > compilation (executed by background tasks) is split in three stages: > getting a compilation unit (while holding a mutex), executing the work > (without any mutex and without keeping the NativeModule alive), and > submitting the work (with a mutex again). > > This CL prepares this design by splitting compilation from submission. > Both steps are still executed right after each other. This will be > changed in a follow-up CL. > > R=titzer@chromium.org > CC=mstarzinger@chromium.org > > Bug: v8:8689 > Change-Id: I2f92aee8e2f2d45470d8c63314ed026341630902 > Reviewed-on: https://chromium-review.googlesource.com/c/1414920 > Reviewed-by: Ben Titzer <titzer@chromium.org> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#58929} TBR=titzer@chromium.org Bug: v8:8689 Change-Id: I58ff07d0e0ac8df0f6ee23c416f992954f4673d2 Reviewed-on: https://chromium-review.googlesource.com/c/1422748Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#58959}
-
- 18 Jan, 2019 2 commits
-
-
Michael Achenbach authored
This reverts commit 4e1d7c87. Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20arm%20-%20sim%20-%20debug/14986 Original change's description: > [wasm] Split compilation in three stages > > In order to refactor ownership between objects in wasm compilation, the > compilation (executed by background tasks) is split in three stages: > getting a compilation unit (while holding a mutex), executing the work > (without any mutex and without keeping the NativeModule alive), and > submitting the work (with a mutex again). > > This CL prepares this design by splitting compilation from submission. > Both steps are still executed right after each other. This will be > changed in a follow-up CL. > > R=titzer@chromium.org > CC=mstarzinger@chromium.org > > Bug: v8:8689 > Change-Id: I2f92aee8e2f2d45470d8c63314ed026341630902 > Reviewed-on: https://chromium-review.googlesource.com/c/1414920 > Reviewed-by: Ben Titzer <titzer@chromium.org> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#58929} TBR=titzer@chromium.org,clemensh@chromium.org Change-Id: Ic3d0287b354ef5f834b76bc2cdc096d2231f4477 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:8689 Reviewed-on: https://chromium-review.googlesource.com/c/1422917Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#58932}
-
Clemens Hammacher authored
In order to refactor ownership between objects in wasm compilation, the compilation (executed by background tasks) is split in three stages: getting a compilation unit (while holding a mutex), executing the work (without any mutex and without keeping the NativeModule alive), and submitting the work (with a mutex again). This CL prepares this design by splitting compilation from submission. Both steps are still executed right after each other. This will be changed in a follow-up CL. R=titzer@chromium.org CC=mstarzinger@chromium.org Bug: v8:8689 Change-Id: I2f92aee8e2f2d45470d8c63314ed026341630902 Reviewed-on: https://chromium-review.googlesource.com/c/1414920Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#58929}
-
- 14 Jan, 2019 1 commit
-
-
Clemens Hammacher authored
Instead, pass it as a parameter to the compilation. This makes compilation units slimmer with the end goal of them being just the function index and execution tier. It also makes ownership handling of the NativeModule easier. R=titzer@chromium.org Bug: v8:8343, v8:7921 Change-Id: I0522c894569c71d8b7245f5ed5612ab2a249e1ad Reviewed-on: https://chromium-review.googlesource.com/c/1406668Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#58776}
-
- 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}
-
- 29 Oct, 2018 1 commit
-
-
Clemens Hammacher authored
The Counters are not specific to compilation units, they just happen to be used in WasmCompilationUnit::ExecuteCompilation. Remove it from the compilation unit and pass it explicitly where needed. This saves another field on the compilation units. R=titzer@chromium.org Bug: v8:8343 Change-Id: Iad4fd8ae23b022c237535503e0e805db7e67071a Reviewed-on: https://chromium-review.googlesource.com/c/1304297 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#57083}
-
- 23 Oct, 2018 2 commits
-
-
Clemens Hammacher authored
R=mstarzinger@chromium.org Bug: v8:8238 Change-Id: I93c9d2a643731766f15f4db1bf7647a85488a6d0 Reviewed-on: https://chromium-review.googlesource.com/c/1296454Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#56906}
-
Clemens Hammacher authored
Instead, create it when needed and pass it down to the actual compilation. This saves memory by making the WasmCompilationUnit smaller and will eventually allow us to implement the trap handler fallback correctly by using an updated ModuleEnv in background compilation and tier up. R=mstarzinger@chromium.org Bug: v8:5277, v8:8343 Change-Id: I0dc3a37fb88e54eb4822dc99d58ff024f4b2a367 Reviewed-on: https://chromium-review.googlesource.com/c/1293953 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#56896}
-
- 19 Oct, 2018 1 commit
-
-
Clemens Hammacher authored
And remove the TurboFan/Liftoff specific {FinishCompilation} implementations completely. Compilation errors are now stored in the {WasmCompilationUnit} directly as a {Result<WasmCode*>}. They are retrieved via {WasmCompilationUnit::ReportError}, which moves the error to the {ErrorThrower}. This prepares more changes to completely remove the {FinishCompilation} phase. R=titzer@chromium.org Bug: v8:7921 Change-Id: I4f9a6e919359aeab074880d0d38211500b76e4ec Reviewed-on: https://chromium-review.googlesource.com/c/1290975 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#56826}
-
- 23 Aug, 2018 3 commits
-
-
Ben L. Titzer authored
This is a reland of b10a967f Original change's description: > [wasm] Add feature counter for threads and shared memory > > This adds a feature counter for WASM shared memory (i.e. the presence > of the "shared" bit in a WASM module's memory section) and the usage > of WASM threads opcodes (i.e. wake/wait and atomics). > > This CL also plumbs the WasmFeatures through the compilation pipeline > to detect features as functions are being compiled. > > R=ahaas@chromium.org, ulan@chromium.org > BUG=chromium:868844 > > Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng > Change-Id: I854f932d3adb16e4fd87196fe2a193950295b856 > Reviewed-on: https://chromium-review.googlesource.com/1186329 > Reviewed-by: Andreas Haas <ahaas@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Commit-Queue: Ben Titzer <titzer@chromium.org> > Cr-Commit-Position: refs/heads/master@{#55337} Bug: chromium:868844 Change-Id: Iac3a38d80fa71aadd7147704669a8fd671ecfae8 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Reviewed-on: https://chromium-review.googlesource.com/1186343 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#55363}
-
Maya Lekova authored
This reverts commit b10a967f. Reason for revert: Breaks a TSAN bot - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20TSAN/22122 Original change's description: > [wasm] Add feature counter for threads and shared memory > > This adds a feature counter for WASM shared memory (i.e. the presence > of the "shared" bit in a WASM module's memory section) and the usage > of WASM threads opcodes (i.e. wake/wait and atomics). > > This CL also plumbs the WasmFeatures through the compilation pipeline > to detect features as functions are being compiled. > > R=ahaas@chromium.org, ulan@chromium.org > BUG=chromium:868844 > > Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng > Change-Id: I854f932d3adb16e4fd87196fe2a193950295b856 > Reviewed-on: https://chromium-review.googlesource.com/1186329 > Reviewed-by: Andreas Haas <ahaas@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Commit-Queue: Ben Titzer <titzer@chromium.org> > Cr-Commit-Position: refs/heads/master@{#55337} TBR=ulan@chromium.org,titzer@chromium.org,ahaas@chromium.org Change-Id: Id011b6707b3359598621b315b87171644132b0ab No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:868844 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Reviewed-on: https://chromium-review.googlesource.com/1186421Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#55340}
-
Ben L. Titzer authored
This adds a feature counter for WASM shared memory (i.e. the presence of the "shared" bit in a WASM module's memory section) and the usage of WASM threads opcodes (i.e. wake/wait and atomics). This CL also plumbs the WasmFeatures through the compilation pipeline to detect features as functions are being compiled. R=ahaas@chromium.org, ulan@chromium.org BUG=chromium:868844 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: I854f932d3adb16e4fd87196fe2a193950295b856 Reviewed-on: https://chromium-review.googlesource.com/1186329Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#55337}
-
- 02 Aug, 2018 1 commit
-
-
Ben L. Titzer authored
The wasm/ directory is inconsistent in many places, often within the same file. For all code that exists in a v8::internal::wasm namespace, this CL removes any wasm:: qualifiers, which is especially helpful since most types are already Wasm-named, such as WasmCode, WasmModule, etc. Namespace qualifiers are redundant inside the wasm:: namespace and thus go against the main point of using namespaces. Removing the qualifiers for non Wasm-named classes also makes the code somewhat more future-proof, should we move some things that are not really WASM-specific (such as ErrorThrower and Decoder) into a higher namespace. R=clemensh@chromium.org,mstarzinger@chromium.org Change-Id: Ibff3e1e93c64c12dcb53c46c03d1bfb2fb0b7586 Reviewed-on: https://chromium-review.googlesource.com/1160232 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#54862}
-
- 05 Jul, 2018 2 commits
-
-
Clemens Hammacher authored
This avoids the need for the finisher task (running on the foreground thread) for Liftoff code. This CL just makes the simple change to call {AddCode} from the background thread. More cleanup will follow in separate CLs. R=mstarzinger@chromium.org Bug: v8:6600, v8:7921 Change-Id: I99ef29377efee5be36ba203aa7ed71e2471d86f3 Reviewed-on: https://chromium-review.googlesource.com/1126930 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#54266}
-
Clemens Hammacher authored
We can actually prepare everything in the background, all that remains to do in the finisher task (on the main thread) is actually adding the code to the {NativeModule}. As a next step, even that should happen in the background. R=mstarzinger@chromium.org Bug: v8:6600 Change-Id: I570f99a9aa7dc7e324046da36cca9b4297f1bc5e Reviewed-on: https://chromium-review.googlesource.com/1126391 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#54239}
-
- 03 Jul, 2018 1 commit
-
-
Michael Starzinger authored
R=clemensh@chromium.org Change-Id: Ia3856921a707e7d58d55a74d3f14cbdc0d69eaa5 Reviewed-on: https://chromium-review.googlesource.com/1124332 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#54168}
-
- 27 Jun, 2018 1 commit
-
-
Clemens Hammacher authored
We currently store the protected instructions per code object in a {std::unique_ptr<std::vector<ProtectedInstructionData>>}. This wastes memory, because it requires two heap allocations, plus the vector might over-allocate (and it currently does, because it is filled dynamically during compilation). This CL changes that to store the protected instructions in an {OwnedVector}. This requires one copy after generating the list of {ProtectedInstructionData} in an {std::vector} during compilation, but saves memory afterwards. R=mstarzinger@chromium.org Bug: chromium:856938 Change-Id: Ie290a17dc32f27fbbfe0c000a52297181c954550 Reviewed-on: https://chromium-review.googlesource.com/1116701Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#54052}
-
- 07 Jun, 2018 1 commit
-
-
Michael Starzinger authored
This makes all runtime calls compiled by Liftoff load the respective CEntry builtin from the instance object instead of embedding it into the instruction stream. Another step towards making the code independent of the originating Isolate. As a drive-by this also changes one implicit runtime call in the stack check in the TurboFan backend in a similar fashion. R=clemensh@chromium.org BUG=v8:7424 Change-Id: Ifab5995aa95250d6fae60ef5debb98aee2b6fc0c Reviewed-on: https://chromium-review.googlesource.com/1089067 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#53578}
-
- 26 Apr, 2018 1 commit
-
-
Vincent Belliard authored
When a liftoff function bails out after generating some constant pool, this avoids to trigger a check in the Assembler destructor. Bug: v8:6600 Change-Id: I79c595605bc0add1f3f5617ac7feedf162081d8a Reviewed-on: https://chromium-review.googlesource.com/1026647Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Vincent Belliard <vincent.belliard@arm.com> Cr-Commit-Position: refs/heads/master@{#52815}
-
- 19 Apr, 2018 1 commit
-
-
Clemens Hammacher authored
This refactoring is a big step towards separating Turbofan-related code from backend independent code. This will allow us to include way less headers from "src/compiler" at various places. The {WasmCompilationUnit} contained information for Turbofan compilation, and for Liftoff compilation. This CL tears this apart, such that {WasmCompilationUnit} holds backend-independent information, plus a pointer to either {LiftoffCompilationUnit} or {TurbofanWasmCompilationUnit}. These pointers are opaque, so that {function-compiler.h}, defining {WasmCompilationUnit}, does not need to include any Turbofan specific or Liftoff specific headers. R=ahaas@chromium.org, titzer@chromium.org, mstarzinger@chromium.org Bug: v8:7570, v8:6600 Change-Id: I024c9a23508ee1b4b3cbe1d068c8e785d732daca Reviewed-on: https://chromium-review.googlesource.com/1016640 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#52684}
-