1. 22 Jan, 2019 1 commit
  2. 15 Jan, 2019 1 commit
  3. 14 Jan, 2019 1 commit
  4. 08 Jan, 2019 2 commits
  5. 03 Jan, 2019 1 commit
    • Clemens Hammacher's avatar
      [wasm] Force GC earlier to avoid running OOM · 9f90c8dc
      Clemens Hammacher authored
      We currently trigger a GC when creating a module while the remaining
      uncommitted code space is below 32MB. For bigger modules, this is not
      enough. Instead, make this limit relative: Trigger GC if we fall below
      50% of the available code space, and re-adjust this limit after each GC
      to avoid repeated GCs that do not free anything.
      
      R=ahaas@chromium.org
      
      Bug: v8:8624
      Change-Id: I7abfad3b57663d528a26d29232ad6bc2dc63cef4
      Reviewed-on: https://chromium-review.googlesource.com/c/1391753Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58527}
      9f90c8dc
  6. 02 Jan, 2019 1 commit
  7. 26 Dec, 2018 1 commit
  8. 12 Dec, 2018 1 commit
  9. 11 Dec, 2018 2 commits
  10. 10 Dec, 2018 1 commit
  11. 21 Nov, 2018 1 commit
    • Ross McIlroy's avatar
      [AsmJs] Avoid allocation of WasmModuleObject until instantiation. · ccd8073c
      Ross McIlroy authored
      Moves allocation of the WasmModuleObject for asm.js code out of SyncCompileTranslatedAsmJS
      since that is called when we are compiling the native context independent SharedFunctionInfo
      and the WasmModuleObject requires a native context. Instead save the members required to
      create the object in the AsmWasmData and create it during module instantiation. Note:
      since the Wasm module is an implementation detail for asm_wasm code and isn't exposed,
      this doeesn't have semantic change for asm.js code.
      
      As part of this change, the AsmWasmData is changed from a FixedArray to a dedicated
      struct. Some logic is also moved from module-compiler to wasm-engine to make the
      seperation between Wasm SyncCompile and AsmJS SyncCompile more clear.
      
      BUG=chromium:900535,v8:8395
      
      Change-Id: Ia48469c095b0688f210aa86e7430c9ab4ea4b26b
      Reviewed-on: https://chromium-review.googlesource.com/c/1345509
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57704}
      ccd8073c
  12. 14 Nov, 2018 1 commit
  13. 12 Nov, 2018 1 commit
  14. 30 Oct, 2018 2 commits
    • Clemens Hammacher's avatar
      [wasm] Fix memory limit checks · fac176d8
      Clemens Hammacher authored
      For memory limit checks, we should use the minimum of the
      --wasm-max-mem-pages flag and kV8MaxWasmMemoryPages. The former is a
      limit set by the user, the latter is the maximum we can handle
      internally.
      
      R=titzer@chromium.org
      
      Bug: chromium:898677
      Change-Id: I3c549f4e90dd016b5d07475d9353f30134f76dcc
      Reviewed-on: https://chromium-review.googlesource.com/c/1305274
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57127}
      fac176d8
    • 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
  15. 29 Oct, 2018 3 commits
  16. 25 Oct, 2018 1 commit
    • Clemens Hammacher's avatar
      [wasm] Store WasmEngine in NativeModule · 69546692
      Clemens Hammacher authored
      The {CompilationState} currently stores the {WasmEngine}, while the
      {NativeModule} only stores the {WasmCodeManager}. From a high-level
      view, this does not make much sense. The {NativeModule} belongs to
      exactly one {WasmEngine}, so that link should be stored there. We can
      then get to the {WasmCodeManager} from the {WasmEngine}.
      
      This change requires a refactoring of the {WasmCodeManagerTest} which
      created {WasmCodeManager}s independent of the {Isolate} and the
      {WasmEngine}. This is not supported any more.
      Note that in production, each {WasmEngine} owns exactly one
      {WasmCodeManager} and one {WasmMemoryTracker}, so testing that a
      {WasmMemoryTracker} can be shared by several {WasmCodeManager}s didn't
      make sense in the first place.
      
      R=mstarzinger@chromium.org
      
      Bug: v8:8217
      Change-Id: I582e698be35f97dbd38bf6e12eb7f8ee4fc1f0f2
      Reviewed-on: https://chromium-review.googlesource.com/c/1297960
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56992}
      69546692
  17. 24 Oct, 2018 1 commit
  18. 23 Oct, 2018 1 commit
    • Clemens Hammacher's avatar
      [wasm] Do not store ModuleEnv · 9716f689
      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: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56896}
      9716f689
  19. 19 Oct, 2018 1 commit
  20. 12 Oct, 2018 1 commit
  21. 25 Sep, 2018 1 commit
  22. 18 Sep, 2018 1 commit
  23. 13 Sep, 2018 1 commit
  24. 07 Sep, 2018 2 commits
  25. 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
  26. 21 Aug, 2018 1 commit
  27. 17 Aug, 2018 1 commit
  28. 14 Aug, 2018 1 commit
    • Andreas Haas's avatar
      Reland "[wasm] Implement the new API for WebAssembly.instantiateStreaming" · 3e545e40
      Andreas Haas authored
      The problem was that in AsyncCompileJob::FinishModule we allocate a
      handle, but when this function is called from streaming compilation, then
      there was no HandleScope around AsyncCompileJob::FinishModule. This issue
      was fixed in another CL, https://crrev.com/c/1172357. This CL is just a
      rebase of the original CL.
      
      Original change's description:
      > [wasm] Implement the new API for WebAssembly.instantiateStreaming
      
      > This is the second V8 CL to refactor WebAssembly.instantiateStreaming to
      > make it spec compliant again. The design doc where the whole change is
      > discussed is available in the tracking bug. The tracking bug also
      > references prototype implementations of the whole change, which includes
      > the changes in this CL.
      
      R=starzinger@chromium.org
      
      Bug: chromium:860637
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: Ib0cb25488654d2b325b4f529d33b76b846c64436
      Reviewed-on: https://chromium-review.googlesource.com/1172429Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55106}
      3e545e40
  29. 13 Aug, 2018 1 commit
  30. 09 Aug, 2018 1 commit
    • Ben L. Titzer's avatar
      [wasm] Add WasmFeatures to enable/detect features · 6aa2a253
      Ben L. Titzer authored
      This CL introduces a set of configuration options implemented as
      a struct of booleans that together comprise the set of enabled
      or detected features. The configuration options replace command-line
      flags that were checked deep in the implementation. As such, it is
      necessary to plumb them through multiple levels of abstraction.
      
      R=ahaas@chromium.org
      CC=mstarzinger@chromium.org
      BUG=chromium:868844
      
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: I1b82f5826e4fd263f68e8cafcd923bac5818a637
      Reviewed-on: https://chromium-review.googlesource.com/1163670Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55018}
      6aa2a253
  31. 07 Aug, 2018 1 commit
    • Andreas Haas's avatar
      [wasm] During instantiation, pending_exceptions dominate new exceptions · 5f105141
      Andreas Haas authored
      For async instantiation of WebAssembly code we had the assumption that
      a pending exceptions (an exception which comes from
      execution JS code) and an ErrorThrower error cannot occur at the same
      time. This assumption turned out to be wrong. With this CL we handle
      this case by prefering pending_exceptions over ErrorThrower errors.
      
      In addition I extended the tests for failing instantiation to also
      exercise async instantiation, and I added a regression test.
      
      R=clemensh@chromium.org
      
      Bug: chromium:870646
      Change-Id: I4cb54ff8642ad4ea193b20f79905c9f6508c2b2e
      Reviewed-on: https://chromium-review.googlesource.com/1163511Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54940}
      5f105141
  32. 02 Aug, 2018 1 commit
    • Andreas Haas's avatar
      Revert "[wasm] Implement the new API for WebAssembly.instantiateStreaming" · fea9300d
      Andreas Haas authored
      This reverts commit b556c9ea.
      
      Reason for revert: Flakes in layout tests: https://crbug.com/870187
      
      Original change's description:
      > [wasm] Implement the new API for WebAssembly.instantiateStreaming
      > 
      > This is the second V8 CL to refactor WebAssembly.instantiateStreaming to
      > make it spec compliant again. The design doc where the whole change is
      > discussed is available in the tracking bug. The tracking bug also
      > references prototype implementations of the whole change, which includes
      > the changes in this CL.
      > 
      > R=​mstarzinger@chromium.org
      > 
      > Bug: chromium:860637
      > Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      > Change-Id: I776c0f24959ab5663727d3dfee0248a9b0642a42
      > Reviewed-on: https://chromium-review.googlesource.com/1143187
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#54834}
      
      TBR=mstarzinger@chromium.org,ahaas@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: chromium:860637
      Change-Id: Icbf2603143068a49c61de162aa7185a753703e5d
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/1160261Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54872}
      fea9300d