1. 04 May, 2020 1 commit
  2. 17 Apr, 2020 1 commit
  3. 16 Apr, 2020 1 commit
    • Clemens Backes's avatar
      [wasm] Clean up tiering logic · a776ccaa
      Clemens Backes authored
      This cleans up several parts of the tiering logic.
      1) Instead of using the {ExecutionTier} to specify whether we do tier up
         or down, we introduce a new {TieringState} enum and use that
         consistently (also where a {bool} was used before).
      2) When tiering up or tiering down, always recompile all functions. It's
         very unlikely that we can reuse previous code anyway (tiering down is
         cheap enough to just always do it, and when tiering up we need to
         recompile everything anyway).
      3) Remove the {WasmEngine::RecompileAllFunctions} method and inline the
         implementation into callers.
      4) Drive-by: Remove some obsolete comments and fix or extend others.
      
      R=thibaudm@chromium.org
      
      Bug: v8:10410
      Change-Id: Ic765c6760dd97473ccfd469f22a2514695075587
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151355Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67175}
      a776ccaa
  4. 09 Apr, 2020 3 commits
  5. 06 Apr, 2020 3 commits
  6. 03 Apr, 2020 2 commits
  7. 31 Mar, 2020 1 commit
  8. 09 Mar, 2020 1 commit
  9. 27 Feb, 2020 1 commit
  10. 20 Feb, 2020 1 commit
    • Paolo Severini's avatar
      Add initial support for Wasm debugging with LLDB: implements a GDB-remote stub · 03fc4149
      Paolo Severini authored
      This is the first piece of the wasm debugging prototype (besides the changes to
      add/remove breakpoints in WasmModuleObject made with
      https://chromium.googlesource.com/v8/v8.git/+/e699f39caed9a23f8e20bd3a0386a3236e272737).
      
      This changelist adds the infrastructure for a GDB-remote stub that will be used
      to manage debugging sessions via the gdb-remote protocol.
      It enables the creation and termination of debugging sessions over TCP
      connections that are managed in a separate thread.
      The logic to actually send, receive and decode GDB-remote packets will be part
      of a future changelist.
      
      Build with: v8_enable_wasm_gdb_remote_debugging = true
      Run with:
        --wasm-gdb-remote                  Enables Wasm debugging with LLDB
                                           (default: false)
        --wasm-gdb-remote-port             TCP port to be used for debugging
                                           (default: 8765)
        --wasm-pause-waiting-for-debugger  Pauses the execution of Wasm code waiting
                                           for a debugger (default: false)
        --trace-wasm-gdb-remote            Enables tracing of Gdb-remote packets
                                           (default: false)
      
      Note that most of this code is "borrowed" from the code of the Chromium NaCL
      GDB-remote stub (located in Chromium in src\native_client\src\trusted\debug_stub).
      
      Implementation details:
      - class GdbServer acts as a singleton manager for the gdb-remote stub. It is
        instantiated as soon as the first Wasm module is loaded in the Wasm engine.
      - class GdbServerThread spawns the worker thread for the TCP connection.
      - class Transport manages the socket connection, in a portable way.
      - class Session represents a remote debugging session.
      - class Target represents a debugging target and it’s the place where the
        debugging packets will be processed and will implement the logic to debug
        a Wasm engine.
      
      Bug: chromium:1010467
      Change-Id: Ib2324e5901f5ae1d855b96b99ef0995d407322b6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1923407Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Paolo Severini <paolosev@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#66379}
      03fc4149
  11. 06 Feb, 2020 2 commits
    • Z Nguyen-Huu's avatar
      Reland "[wasm] Tierdown wasm module upon "Debugger.enable"" · 1f7861c8
      Z Nguyen-Huu authored
      This is a reland of 410ca4c5
      
      Skip new test for unsupported liftoff architecture.
      Previously, if there is some unsupported liftoff functions, it fall
      through Turbofan but recompilation didn't catch and count it. This CL
      fixes it by using requested_tier on finished units.
      
      Avoid to tier down asm.js.
      Introduce reached recompilation tier to monitor recompilation progress.
      
      Original change's description:
      > [wasm] Tierdown wasm module upon "Debugger.enable"
      >
      > Put a logic in Wasm Engine to tier down all existing modules per isolate
      > when debugger is enabled. This CL does not handle new module added after
      > debugger is enabled yet.
      >
      > Bug: v8:9654
      > Change-Id: I87060f5c416506543fcaf231bff9999d06ba4c0d
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013692
      > Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66017}
      
      TBR=szuend@chromium.org,bmeurer@chromium.org
      
      Bug: v8:9654
      Change-Id: I6014ae52d1e04726e64ee9267c5ce559090414d7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2031744
      Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66164}
      1f7861c8
    • Thibaud Michaud's avatar
      [wasm] Add some DCHECKs to the native module cache · 9c44330d
      Thibaud Michaud authored
      And fix a few issues that were already found.
      
      R=clemensb@chromium.org
      
      Change-Id: Ib93626751220dcdd2b9647a6e352bd86bd0ef1ef
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2039053
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66155}
      9c44330d
  12. 04 Feb, 2020 3 commits
  13. 03 Feb, 2020 1 commit
    • Thibaud Michaud's avatar
      Reland "Reland "[wasm] Cache streaming compilation result"" · ab6c4669
      Thibaud Michaud authored
      This is a reland of 9781aa07
      
      Original change's description:
      > Reland "[wasm] Cache streaming compilation result"
      >
      > This is a reland of 015f379a
      >
      > Original change's description:
      > > [wasm] Cache streaming compilation result
      > >
      > > Before compiling the code section, check whether the
      > > bytes received so far match a cached module. If they do, delay
      > > compilation until we receive the full bytes, since we are likely to find
      > > a cache entry for them.
      > >
      > > R=clemensb@chromium.org
      > >
      > > Bug: v8:6847
      > > Change-Id: Ie5170d1274da3da6d52ff1b408abc7cb441bbe3c
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002823
      > > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#66000}
      >
      > Bug: v8:6847
      > Change-Id: I0b5acffa01aeb7dade3dc966392814383d900015
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2022951
      > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66047}
      
      Bug: v8:6847
      Change-Id: I272f56eee28010f34cc99df475164581c8b63036
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
      Cq-Include-Trybots: luci.v8.try:v8_linux64_msan_rel
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030741
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66081}
      ab6c4669
  14. 30 Jan, 2020 3 commits
    • Eric Leese's avatar
      Revert "[wasm] Tierdown wasm module upon "Debugger.enable"" · fb96381b
      Eric Leese authored
      This reverts commit 410ca4c5.
      
      Reason for revert: This was causing Chrome to hang when debugging large wasm binaries.
      
      Clean revert except for modification to test/debugger/debugger.status
      
      Bug: chromium:1047210, v8:9654
      
      Original change's description:
      > [wasm] Tierdown wasm module upon "Debugger.enable"
      >
      > Put a logic in Wasm Engine to tier down all existing modules per isolate
      > when debugger is enabled. This CL does not handle new module added after
      > debugger is enabled yet.
      >
      > Bug: v8:9654
      > Change-Id: I87060f5c416506543fcaf231bff9999d06ba4c0d
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013692
      > Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66017}
      
      TBR=clemensb@chromium.org,bmeurer@chromium.org,duongn@microsoft.com,szuend@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:9654
      Change-Id: Id49e8c69f8212e95e698d7e7267056fb2eb7e60a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030737
      Auto-Submit: Eric Leese <leese@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66054}
      fb96381b
    • Thibaud Michaud's avatar
      Revert "Reland "[wasm] Cache streaming compilation result"" · 06a4e080
      Thibaud Michaud authored
      This reverts commit 9781aa07.
      
      Reason for revert: tsan bot failure: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/30110
      
      Original change's description:
      > Reland "[wasm] Cache streaming compilation result"
      > 
      > This is a reland of 015f379a
      > 
      > Original change's description:
      > > [wasm] Cache streaming compilation result
      > > 
      > > Before compiling the code section, check whether the
      > > bytes received so far match a cached module. If they do, delay
      > > compilation until we receive the full bytes, since we are likely to find
      > > a cache entry for them.
      > > 
      > > R=clemensb@chromium.org
      > > 
      > > Bug: v8:6847
      > > Change-Id: Ie5170d1274da3da6d52ff1b408abc7cb441bbe3c
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002823
      > > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#66000}
      > 
      > Bug: v8:6847
      > Change-Id: I0b5acffa01aeb7dade3dc966392814383d900015
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2022951
      > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66047}
      
      TBR=clemensb@chromium.org,thibaudm@chromium.org
      
      Change-Id: I76e3561835815ac3d5bca74e76079e82f9f3d581
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6847
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030727Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66050}
      06a4e080
    • Thibaud Michaud's avatar
      Reland "[wasm] Cache streaming compilation result" · 9781aa07
      Thibaud Michaud authored
      This is a reland of 015f379a
      
      Original change's description:
      > [wasm] Cache streaming compilation result
      > 
      > Before compiling the code section, check whether the
      > bytes received so far match a cached module. If they do, delay
      > compilation until we receive the full bytes, since we are likely to find
      > a cache entry for them.
      > 
      > R=clemensb@chromium.org
      > 
      > Bug: v8:6847
      > Change-Id: Ie5170d1274da3da6d52ff1b408abc7cb441bbe3c
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002823
      > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66000}
      
      Bug: v8:6847
      Change-Id: I0b5acffa01aeb7dade3dc966392814383d900015
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2022951
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66047}
      9781aa07
  15. 29 Jan, 2020 1 commit
  16. 27 Jan, 2020 2 commits
  17. 22 Jan, 2020 1 commit
    • Z Nguyen-Huu's avatar
      Reland "[wasm] Perform NativeModule tier down in parallel." · 30f94ea4
      Z Nguyen-Huu authored
      This is a reland of faccc95b
      
      Since 1c9bb77d, async jobs use existing
      entry in native module cache and skip recompilation so we need to fix
      the test.
      
      Original change's description:
      > Reland "[wasm] Perform NativeModule tier down in parallel."
      >
      > This is a reland of 3352fcc9
      >
      > Disable stress-opt for test and check recompilation before clearing
      > callbacks.
      >
      > Original change's description:
      > > [wasm] Perform NativeModule tier down in parallel.
      > >
      > > Reuse logic in {CompileNativeModule} function in module-compiler.cc:
      > > initialize parallel compile jobs, then wait for them to finish while
      > > taking part in this compilation.
      > >
      > > Bug: v8:9654
      > > Change-Id: I9974d9f8b516e9faec716a592c7c0ee9c7077d8e
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1977041
      > > Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
      > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#65763}
      >
      > Bug: v8:9654
      > Change-Id: I8e8830f05e189596207365b7332a2cc25e493e47
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002945
      > Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#65901}
      
      Bug: v8:9654
      Change-Id: Ia63b86d4275088d93202046bc9823e6202b7991a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2012986Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#65929}
      30f94ea4
  18. 21 Jan, 2020 3 commits
  19. 15 Jan, 2020 1 commit
  20. 14 Jan, 2020 1 commit
  21. 18 Dec, 2019 1 commit
  22. 02 Dec, 2019 3 commits
  23. 26 Nov, 2019 1 commit
  24. 07 Nov, 2019 1 commit
    • Clemens Backes's avatar
      [wasm] Remove one {NewNativeModule} method · dde3166b
      Clemens Backes authored
      This makes the {code_size_estimate} computation explicit in the caller,
      and removes one of the two {NewNativeModule} constructors. It turns out
      that the calculation is totally off in the streaming calculation phase,
      since no function bodies have been parsed yet. So all
      {WasmFunction::code} fields are still empty, and we compute an estimate
      that is way too low.
      This CL prepares the actual fix for that (by computing a better estimate
      at specific call sites).
      
      R=ahaas@chromium.org
      
      Bug: v8:9950
      Change-Id: I68a891c97e5f65a9c7e73e21684bdfa7e261e216
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1901273
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64845}
      dde3166b
  25. 16 Oct, 2019 1 commit