1. 14 Apr, 2020 4 commits
    • Clemens Backes's avatar
      Revert "[wasm-debug-eval] Implement additional evaluator API methods" · efea7407
      Clemens Backes authored
      This reverts commit f2ea42d6.
      
      Reason for revert: Makes UBSan unhappy: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/10634
      
      Original change's description:
      > [wasm-debug-eval] Implement additional evaluator API methods
      > 
      > This CL implements the __getLocal and __sbrk APIs of the evaluator
      > interface.  Also includes a drive-by fix of the imports' module: put
      > them on the "env" module.
      > 
      > Change-Id: Ie16d1b1cf924b88734eda184d1ce98d52f32f828
      > Bug: chromium:1020120
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2132786
      > Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#67122}
      
      TBR=jkummerow@chromium.org,pfaffe@chromium.org
      
      Change-Id: I23b078d37971e083c08c9b83994bbf38ac13f103
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:1020120
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2148787Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67124}
      efea7407
    • Philip Pfaffe's avatar
      [wasm-debug-eval] Implement additional evaluator API methods · f2ea42d6
      Philip Pfaffe authored
      This CL implements the __getLocal and __sbrk APIs of the evaluator
      interface.  Also includes a drive-by fix of the imports' module: put
      them on the "env" module.
      
      Change-Id: Ie16d1b1cf924b88734eda184d1ce98d52f32f828
      Bug: chromium:1020120
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2132786
      Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67122}
      f2ea42d6
    • Clemens Backes's avatar
      [wasm] Store whether code was generated for debugging · 4721585b
      Clemens Backes authored
      This adds a flag to {WasmCode} objects to store whether this code was
      generated for debugging. This flag can be set for Liftoff code (in which
      case the code will e.g. have an extended prologue for debugging), but it
      can also be set for TurboFan, in case Liftoff bailed out when producing
      the debugging code.
      
      Having this flag allows us to remove the hack to pass the compilation
      results to {OnFinishedUnits} just to check whether we actually wanted to
      compile Liftoff functions.
      
      Drive-by: Replace the {ReachedRecompilationTierField} by a
      {MissingRecompilationField}, because all we need to know is if we are
      still waiting for that function to get recompiled.
      
      R=ahaas@chromium.org
      
      Bug: v8:10330,v8:10410
      Change-Id: Ia023df8955a60d9f5595a6cb2737e14d83baf716
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2142259
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67119}
      4721585b
    • Clemens Backes's avatar
      [wasm][debug] Store "for debugging" flag on compilation unit · e0433f7d
      Clemens Backes authored
      Before the "debug" flag was stored on the {CompilationEnv}. But each
      background compilation task only gets the {CompilationEnv} once when
      starting compilation, so by the time it picks up the "Liftoff for
      debugging" compilation jobs, it might still compile them without the
      debug flag being set. This leads to flakes in the "debug-step-into-wasm"
      test, because we won't stop in the function prologue when stepping in
      (because the function prologue does not check the "hook on function
      call" flag if debug mode was not enabled).
      
      This CL does not increase the size of a compilation unit, since both the
      tier and the debug flag only need a single byte each.
      
      As a nice side effect, this change allows us to remove the lock in
      {CreateCompilationEnv}, because no modifyable flag is read any more.
      
      R=thibaudm@chromium.org
      
      Bug: v8:10410
      Change-Id: Ic296ea0c4dd1d4dedde119f0536e87e5d301b5a1
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144116Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67115}
      e0433f7d
  2. 09 Apr, 2020 4 commits
  3. 08 Apr, 2020 1 commit
  4. 06 Apr, 2020 3 commits
  5. 03 Apr, 2020 2 commits
  6. 31 Mar, 2020 1 commit
  7. 30 Mar, 2020 1 commit
  8. 27 Mar, 2020 1 commit
    • Clemens Backes's avatar
      [wasm][debug] Stage --debug-in-liftoff behind --future · 0f4d68da
      Clemens Backes authored
      There are only three tests with differing behaviour if Liftoff is used
      for debugging.
      This CL thus stages the --debug-in-liftoff flag behind --future (tested
      by the "future" variant) and excludes the three tests.
      This allows us to test the other (already working) tests for
      regressions, and iteratively shrinking down the list of failing tests.
      
      Drive-by: Tier down modules in tests before testing debugging features
      to avoid hitting a DCHECK in Liftoff recompilation for debugging.
      
      R=thibaudm@chromium.org, ecmziegler@chromium.org
      
      Bug: v8:10351
      Change-Id: I3b1dd1a29258ecf13c1f60020fb06358005558d4
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122021Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66889}
      0f4d68da
  9. 25 Mar, 2020 1 commit
  10. 23 Mar, 2020 1 commit
  11. 20 Mar, 2020 1 commit
    • Ng Zhi An's avatar
      [wasm-simd] New macro to build using vector of bytes · 1e40c682
      Ng Zhi An authored
      Introduces a new macro BUILD_V (v is for vector) that pushes bytes into
      a vector (instead of directly in an array initializer, see BUILD). This
      has the positive effect of being able to handle opcodes of multiple
      bytes (e.g. SIMD opcodes bigger that 0xfd80). Because of this "API"
      change, our helper macros in test-run-wasm-simd.cc and wasm-run-utils.h
      need to change too. So, we introduce new macros (suffixed by _V), that
      will call the appropriate lambdas defined in BUILD_V, that knows how to
      push bytes into the vector, and also can handle multi-byte opcodes.
      
      This design has a bit of duplication and ugliness, but was chosen to
      reduce the impact of existing tests. No restructuring of test code is
      required, we only need to add suffix _V.
      
      Note that we do not have multi-byte opcodes yet (in wasm-opcodes.h),
      this change will be breaking, and requires all the tests to be updated
      to use _V macros first.
      
      Bug: v8:10258
      Change-Id: I86638a548fe2f9714c1cfb3bd691fb7b49bfd652
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2107650
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66812}
      1e40c682
  12. 19 Mar, 2020 2 commits
  13. 18 Mar, 2020 1 commit
  14. 17 Mar, 2020 2 commits
  15. 12 Mar, 2020 2 commits
  16. 06 Mar, 2020 1 commit
  17. 05 Mar, 2020 3 commits
    • Clemens Backes's avatar
      Reland "[wasm] Further reduce the size of WasmCode" · 13cdf3a7
      Clemens Backes authored
      This is a reland of 79398ab0
      
      Original change's description:
      > [wasm] Further reduce the size of WasmCode
      >
      > Also, save dynamic allocations (plus their memory overhead).
      > This is realized by storing the relocation information, source position
      > table, and protected instruction information together in one "metadata"
      > byte array.
      > For each of the three components, we just store their size, such that
      > the accessors can return the respecitive {Vector} views as before.
      >
      > This makes each WasmCode object 24 bytes smaller on 64-bit
      > architectures. It also saves a few more bytes per code object because
      > less padding is needed for the individual allocations, and each dynamic
      > allocation comes with some constant memory overhead.
      >
      > Since the protected instructions will just be stored in a byte array
      > now, some APIs are refactored to just return that byte array directly
      > (instead of an array of {ProtectedInstructionData}). This also
      > simplifies serialization and deserialization, and will allow for
      > switching to a more compact representation in the future.
      >
      > Drive-by: Add some more checks to {Vector::cast} to protect against
      >   undefined behaviour.
      >
      > R=ahaas@chromium.org
      >
      > Bug: v8:10254
      > Change-Id: I81ca847023841110e3e52cc402fcb0349325d7af
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2078545
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66596}
      
      Tbr: ahaas@chromium.org
      Bug: v8:10254
      Change-Id: Idcdcb4f13c3eb7a3f7fb5ef8a1229103ca0ae975
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2089934Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66598}
      13cdf3a7
    • Clemens Backes's avatar
      Revert "[wasm] Further reduce the size of WasmCode" · 28afd1c9
      Clemens Backes authored
      This reverts commit 79398ab0.
      
      Reason for revert: Makes UBSan unhappy: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/10186
      
      Original change's description:
      > [wasm] Further reduce the size of WasmCode
      > 
      > Also, save dynamic allocations (plus their memory overhead).
      > This is realized by storing the relocation information, source position
      > table, and protected instruction information together in one "metadata"
      > byte array.
      > For each of the three components, we just store their size, such that
      > the accessors can return the respecitive {Vector} views as before.
      > 
      > This makes each WasmCode object 24 bytes smaller on 64-bit
      > architectures. It also saves a few more bytes per code object because
      > less padding is needed for the individual allocations, and each dynamic
      > allocation comes with some constant memory overhead.
      > 
      > Since the protected instructions will just be stored in a byte array
      > now, some APIs are refactored to just return that byte array directly
      > (instead of an array of {ProtectedInstructionData}). This also
      > simplifies serialization and deserialization, and will allow for
      > switching to a more compact representation in the future.
      > 
      > Drive-by: Add some more checks to {Vector::cast} to protect against
      >   undefined behaviour.
      > 
      > R=​ahaas@chromium.org
      > 
      > Bug: v8:10254
      > Change-Id: I81ca847023841110e3e52cc402fcb0349325d7af
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2078545
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66596}
      
      TBR=jkummerow@chromium.org,ahaas@chromium.org,clemensb@chromium.org,tebbi@chromium.org
      
      Change-Id: Id80aa82cfce8942879031032b322ee66855b5600
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10254
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2089933Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66597}
      28afd1c9
    • Clemens Backes's avatar
      [wasm] Further reduce the size of WasmCode · 79398ab0
      Clemens Backes authored
      Also, save dynamic allocations (plus their memory overhead).
      This is realized by storing the relocation information, source position
      table, and protected instruction information together in one "metadata"
      byte array.
      For each of the three components, we just store their size, such that
      the accessors can return the respecitive {Vector} views as before.
      
      This makes each WasmCode object 24 bytes smaller on 64-bit
      architectures. It also saves a few more bytes per code object because
      less padding is needed for the individual allocations, and each dynamic
      allocation comes with some constant memory overhead.
      
      Since the protected instructions will just be stored in a byte array
      now, some APIs are refactored to just return that byte array directly
      (instead of an array of {ProtectedInstructionData}). This also
      simplifies serialization and deserialization, and will allow for
      switching to a more compact representation in the future.
      
      Drive-by: Add some more checks to {Vector::cast} to protect against
        undefined behaviour.
      
      R=ahaas@chromium.org
      
      Bug: v8:10254
      Change-Id: I81ca847023841110e3e52cc402fcb0349325d7af
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2078545Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66596}
      79398ab0
  18. 03 Mar, 2020 2 commits
  19. 02 Mar, 2020 1 commit
  20. 28 Feb, 2020 1 commit
  21. 27 Feb, 2020 1 commit
  22. 26 Feb, 2020 3 commits
  23. 24 Feb, 2020 1 commit