1. 19 Mar, 2019 1 commit
  2. 14 Mar, 2019 1 commit
    • Clemens Hammacher's avatar
      [wasm] Make error messages deterministic · eb1d2d70
      Clemens Hammacher authored
      Compilation only stores whether an error has been found, but not the
      exact error or it's location. This is generated by running a validation
      pass once all wire bytes have been received.
      This unifies error messages by removing one more location where we
      generate compilation error messages, and makes it deterministic because
      a) we always report the error in the first failing function, and
      b) if names are present, the error message will always contain the
         function name.
      
      R=titzer@chromium.org
      
      Bug: chromium:926311, v8:8814
      Change-Id: I79551b8bb73dcee503484de343a3ada60a6add4f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521112
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60242}
      eb1d2d70
  3. 12 Mar, 2019 1 commit
  4. 04 Feb, 2019 1 commit
  5. 30 Jan, 2019 1 commit
  6. 29 Jan, 2019 1 commit
    • Clemens Hammacher's avatar
      [wasm] Distinguish requested tier and executed tier · 185922de
      Clemens Hammacher authored
      During execution, the tier can be switch from Liftoff to TurboFan. We
      already handle this in some locations by getting the tier before
      execution, so that we later know which was the requested tier for that
      unit.
      In the case of the --wasm-tier-mask-for-testing flag, this accounting
      was not right because the tier was already switched in the constructor.
      This CL changes the compilation units to store both the requested and
      the executed tier explicitly, so we know which counter to decrement
      when the unit finishes.
      
      R=ahaas@chromium.org
      
      Bug: chromium:925671
      Change-Id: I673463135e9b3ab17e40cfdfd5d3a526ad5a9b79
      Reviewed-on: https://chromium-review.googlesource.com/c/1442639Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59168}
      185922de
  7. 25 Jan, 2019 1 commit
    • Andreas Haas's avatar
      [wasm][anyref] Support anyref stack parameters · 258371bd
      Andreas Haas authored
      Anyref parameters can exist across GC runs. Therefore the GC has to
      know where anyref parameters are on the stack so that it can mark them
      in its marking phase, and update them in the compaction phase.
      
      Already in a previous CL we grouped all anyref parameters so that they
      can be found more easily in a stack frame, see
      https://crrev.com/c/1371827. In this CL we implement the stack scanning
      itself.
      
      Note that anyref parameters are not scanned while iterating over the
      caller's frame (to which they actually belong), but while iterating
      over the callee's frame. The reason is that with tail-calls, only the
      callee knows how many tagged stack parameters (aka anyref parameters)
      there are.
      
      R=mstarzinger@chromium.org
      also-by=mstarzinger@chromium.org
      
      Bug: v8:7581
      Change-Id: I7a41ce11d06c0d420146fdb0bb8d5606f28824d7
      Reviewed-on: https://chromium-review.googlesource.com/c/1424955
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59099}
      258371bd
  8. 24 Jan, 2019 1 commit
  9. 21 Jan, 2019 1 commit
    • Clemens Hammacher's avatar
      Reland "[wasm] Split compilation in three stages" · 6c2e35b9
      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: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58959}
      6c2e35b9
  10. 18 Jan, 2019 3 commits
    • Michael Achenbach's avatar
      Revert "[wasm] Split compilation in three stages" · b7cc4f7a
      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: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58932}
      b7cc4f7a
    • Clemens Hammacher's avatar
      [wasm] Split compilation in three stages · 4e1d7c87
      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: 's avatarBen Titzer <titzer@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58929}
      4e1d7c87
    • Clemens Hammacher's avatar
      [wasm] Remove redundant GetSharedWireBytesStorage · babdc422
      Clemens Hammacher authored
      It does exactly the same as GetWireBytesStorage.
      Also change the WasmCompilationUnit::ExecuteCompilation method to
      receive a reference to the shared_ptr, since it does not take (shared)
      ownership. This saves one ref count increment and decrement.
      
      R=titzer@chromium.org
      
      Bug: v8:8689
      Change-Id: I03c3ec5f907c738c73e0dc16646d78ecac3f3717
      Reviewed-on: https://chromium-review.googlesource.com/c/1417632
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58908}
      babdc422
  11. 14 Jan, 2019 1 commit
  12. 12 Dec, 2018 1 commit
  13. 14 Nov, 2018 1 commit
  14. 07 Nov, 2018 1 commit
    • Clemens Hammacher's avatar
      [wasm] Decouple wire bytes from compilation units · 014d9e4f
      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: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57317}
      014d9e4f
  15. 30 Oct, 2018 1 commit
    • Clemens Hammacher's avatar
      Reland "[wasm] Store compile errors in CompilationState" · 1ff80455
      Clemens Hammacher authored
      This is a reland of bf3d7b9a
      
      Original change's description:
      > [wasm] Store compile errors in CompilationState
      > 
      > We are currently storing compilation errors in the individual
      > compilation units and pass it to the ErrorThrower during finishing.
      > This CL changes that to store errors on the CompilationState directly.
      > From there, it is propagated to the ErrorThrower in the compilation
      > state callback.
      > This removes more work from the finisher task and slims down the
      > WasmCompilationUnits.
      > 
      > R=mstarzinger@chromium.org
      > 
      > Bug: v8:8343, v8:7921
      > Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9
      > Reviewed-on: https://chromium-review.googlesource.com/c/1303720
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#57091}
      
      Bug: v8:8343, v8:7921
      Change-Id: Iaa5c89d224cb2bcfca2d12eba305413a9ad95618
      Reviewed-on: https://chromium-review.googlesource.com/c/1304547
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57126}
      1ff80455
  16. 29 Oct, 2018 3 commits
    • Maya Lekova's avatar
      Revert "[wasm] Store compile errors in CompilationState" · dd5c3631
      Maya Lekova authored
      This reverts commit bf3d7b9a.
      
      Reason for revert: Breaks TSAN build, see
      https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20TSAN/23248
      
      Original change's description:
      > [wasm] Store compile errors in CompilationState
      > 
      > We are currently storing compilation errors in the individual
      > compilation units and pass it to the ErrorThrower during finishing.
      > This CL changes that to store errors on the CompilationState directly.
      > From there, it is propagated to the ErrorThrower in the compilation
      > state callback.
      > This removes more work from the finisher task and slims down the
      > WasmCompilationUnits.
      > 
      > R=​mstarzinger@chromium.org
      > 
      > Bug: v8:8343, v8:7921
      > Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9
      > Reviewed-on: https://chromium-review.googlesource.com/c/1303720
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#57091}
      
      TBR=mstarzinger@chromium.org,clemensh@chromium.org
      
      Change-Id: Id32c7337494a4749485adbcfcaae7b2331afea66
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:8343, v8:7921
      Reviewed-on: https://chromium-review.googlesource.com/c/1304544Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57094}
      dd5c3631
    • Clemens Hammacher's avatar
      [wasm] Store compile errors in CompilationState · bf3d7b9a
      Clemens Hammacher authored
      We are currently storing compilation errors in the individual
      compilation units and pass it to the ErrorThrower during finishing.
      This CL changes that to store errors on the CompilationState directly.
      From there, it is propagated to the ErrorThrower in the compilation
      state callback.
      This removes more work from the finisher task and slims down the
      WasmCompilationUnits.
      
      R=mstarzinger@chromium.org
      
      Bug: v8:8343, v8:7921
      Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9
      Reviewed-on: https://chromium-review.googlesource.com/c/1303720Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57091}
      bf3d7b9a
    • Clemens Hammacher's avatar
      [wasm] Do not store Counters in compilation units · 6e0706bc
      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: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57083}
      6e0706bc
  17. 24 Oct, 2018 1 commit
  18. 23 Oct, 2018 3 commits
  19. 19 Oct, 2018 2 commits
  20. 12 Sep, 2018 1 commit
  21. 23 Aug, 2018 3 commits
    • Ben L. Titzer's avatar
      Reland "[wasm] Add feature counter for threads and shared memory" · ab6d5ed5
      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: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55363}
      ab6d5ed5
    • Maya Lekova's avatar
      Revert "[wasm] Add feature counter for threads and shared memory" · a984ccd7
      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: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55340}
      a984ccd7
    • Ben L. Titzer's avatar
      [wasm] Add feature counter for threads and shared memory · b10a967f
      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: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55337}
      b10a967f
  22. 21 Aug, 2018 1 commit
  23. 02 Aug, 2018 1 commit
    • Ben L. Titzer's avatar
      [cleanup] Remove redundant wasm:: namespace prefixes · 99de47f1
      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: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54862}
      99de47f1
  24. 01 Aug, 2018 1 commit
  25. 27 Jul, 2018 1 commit
    • Ben L. Titzer's avatar
      [wasm] Support 4GiB memories in Liftoff · 352e408b
      Ben L. Titzer authored
      Add codegen support for up to 4GiB memories in Liftoff code.
      
      This CL also adds three new mjsunit tests that stress large WASM
      memories (1, 2, and 4 GiB) and checks that accesses near these
      boundaries properly generate traps.
      
      Note there is still some trickiness around the setting of:
        1.) the flag --wasm-max-mem-pages
        2.) wasm-limits.h kSpecMaxWasmMemoryPages = 65536
        3.) wasm-limits.h kV8MaxWasmMemoryPages = 32767
      
      In particular, the allocation of memories is still limited to
      3.) and the runtime flag can only lower this limit.
      
      The above means that the tests for 2GiB and 4GiB memories will silently
      OOM by design until 3.) is changed (though they currently pass with
      manual testing). I argue it is better to include these tests up front,
      since they will immediately trigger if their memory allocation succeeds.
      
      Therefore the plan is to lift the restriction on 3.) after removing
      all other other internal V8 limitations including array buffers and views.
      
      R=clemensh@chromium.org
      CC=mstarzinger@chromium.org
      BUG=v8:7881
      
      Change-Id: I3205ac2daf5c9a84364c670a2c3ef2258e5649f6
      Reviewed-on: https://chromium-review.googlesource.com/1151309
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54754}
      352e408b
  26. 20 Jul, 2018 1 commit
  27. 19 Jul, 2018 1 commit
  28. 16 Jul, 2018 1 commit
  29. 13 Jul, 2018 1 commit
  30. 29 Jun, 2018 1 commit
  31. 04 Jun, 2018 1 commit