1. 05 Feb, 2022 3 commits
  2. 03 Feb, 2022 1 commit
    • Thibaud Michaud's avatar
      Reland "Reland "[wasm] Resume suspender on resolved promise"" · dfbe5028
      Thibaud Michaud authored
      This is a reland of f942f656
      
      Changes: Change the order of initialization for wasm continuations to
      ensure object integrity if a GC happens during allocation. Also add
      missing handles.
      
      Original change's description:
      > Reland "[wasm] Resume suspender on resolved promise"
      >
      > This is a reland of a865d16b
      >
      > Changes:
      > - Make the next ID atomic
      > - Leave more space for runtime calls in debug mode
      >
      > Original change's description:
      > > [wasm] Resume suspender on resolved promise
      > >
      > > Implement the WasmResume builtin, which resumes a wasm suspender
      > > when the corresponding JS promise resolves.
      > >
      > > Drive-by 1: Fix detection of empty stacks in the stack frame iterator.
      > > Drive-by 2: Add a stack ID for better tracing.
      > >
      > > R=ahaas@chromium.org
      > > CC=​fgm@chromium.org
      > >
      > > Bug: v8:12191
      > > Change-Id: Ifa3f00c4259f802292b04d426c739e9b551f87b9
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3420827
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > > Cr-Commit-Position: refs/heads/main@{#78842}
      >
      > Bug: v8:12191
      > Change-Id: I3c231690b27be79a0c00e13043342bb4a3628886
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427203
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78890}
      
      Bug: v8:12191
      Change-Id: I0e1362d3a9da1fd8c0d600ad9776ce2fd26c6a52
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3434145Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78922}
      dfbe5028
  3. 01 Feb, 2022 2 commits
    • Thibaud Michaud's avatar
      Revert "Reland "[wasm] Resume suspender on resolved promise"" · cb12a3e4
      Thibaud Michaud authored
      This reverts commit f942f656.
      
      Reason for revert: Breaks gc-stress
      
      Original change's description:
      > Reland "[wasm] Resume suspender on resolved promise"
      >
      > This is a reland of a865d16b
      >
      > Changes:
      > - Make the next ID atomic
      > - Leave more space for runtime calls in debug mode
      >
      > Original change's description:
      > > [wasm] Resume suspender on resolved promise
      > >
      > > Implement the WasmResume builtin, which resumes a wasm suspender
      > > when the corresponding JS promise resolves.
      > >
      > > Drive-by 1: Fix detection of empty stacks in the stack frame iterator.
      > > Drive-by 2: Add a stack ID for better tracing.
      > >
      > > R=ahaas@chromium.org
      > > CC=​fgm@chromium.org
      > >
      > > Bug: v8:12191
      > > Change-Id: Ifa3f00c4259f802292b04d426c739e9b551f87b9
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3420827
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > > Cr-Commit-Position: refs/heads/main@{#78842}
      >
      > Bug: v8:12191
      > Change-Id: I3c231690b27be79a0c00e13043342bb4a3628886
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427203
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78890}
      
      Bug: v8:12191
      Change-Id: I5037419b6cee7a3bb49c1649e5a5d11a935a9b28
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Auto-submit: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3429500
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Auto-Submit: Thibaud Michaud <thibaudm@chromium.org>
      Owners-Override: Maya Lekova <mslekova@chromium.org>
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78893}
      cb12a3e4
    • Thibaud Michaud's avatar
      Reland "[wasm] Resume suspender on resolved promise" · f942f656
      Thibaud Michaud authored
      This is a reland of a865d16b
      
      Changes:
      - Make the next ID atomic
      - Leave more space for runtime calls in debug mode
      
      Original change's description:
      > [wasm] Resume suspender on resolved promise
      >
      > Implement the WasmResume builtin, which resumes a wasm suspender
      > when the corresponding JS promise resolves.
      >
      > Drive-by 1: Fix detection of empty stacks in the stack frame iterator.
      > Drive-by 2: Add a stack ID for better tracing.
      >
      > R=ahaas@chromium.org
      > CC=​fgm@chromium.org
      >
      > Bug: v8:12191
      > Change-Id: Ifa3f00c4259f802292b04d426c739e9b551f87b9
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3420827
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78842}
      
      Bug: v8:12191
      Change-Id: I3c231690b27be79a0c00e13043342bb4a3628886
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427203Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78890}
      f942f656
  4. 28 Jan, 2022 4 commits
  5. 27 Jan, 2022 5 commits
  6. 26 Jan, 2022 5 commits
  7. 21 Jan, 2022 1 commit
  8. 20 Jan, 2022 1 commit
  9. 17 Jan, 2022 1 commit
    • Benedikt Meurer's avatar
      [debug] Decouple async event delegate instrumentation from PromiseHooks. · b46d5ffb
      Benedikt Meurer authored
      As described in https://crbug.com/1287476, the fact that the
      AsyncEventDelegate is currently implemented on top of the PromiseHooks
      causes performance problems and makes it difficult to reason about the
      exact (observed) semantics; this is because for this we intercept every
      JSPromise creation (via PromiseHook::kInit) and walk the synchronous
      stack at that point to see if we find one of Promise#then(),
      Promise#catch() or Promise#finally() on the stack. And if we do so, we
      report that to the AsyncEventDelegate (which is implemented in the
      inspector and will then do the async stack/stepping logic on top).
      
      This CL introduces dedicated instrumentation for Promise#then(), which
      is also called from Promise#catch() and Promise#finally(), and uses that
      instrumentation for the purpose of the AsyncEventDelegate. It also
      adjusts the stack walk to not always walk the full stack (which might
      lead to wrong results when calls to Promise#then(), which itself can
      call back into user JavaScript, are found deeper in the stack), but
      instead only check the top-most builtin frames and whatever user
      JavaScript frame is underneath it.
      
      On the standalone.js (from https://crbug.com/1287476#c1), when run with
      the DevTools default of maxDepth=200, we go from around 4.00ms to around
      0.36ms. For everything that does not call Promise#then() - either
      explicitly or implicitly - or `await`s, there's now no observable
      performance impact of turning on the AsyncEventDelegate.
      
      Bug: chromium:1280519
      Fixed: chromium:1287476
      Change-Id: I4911bed146381fc46cfeefb763d6dfc32e8f6071
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386379
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78640}
      b46d5ffb
  10. 14 Jan, 2022 3 commits
  11. 13 Jan, 2022 3 commits
    • Benedikt Meurer's avatar
      [async-await] Further simplify `await` and its instrumentation. · 302a5d20
      Benedikt Meurer authored
      Following up on https://crrev.com/c/3383775 we are now able to further
      simplify the implementation of `await` and its instrumentation (for both
      debugger and promise hooks), which aligns the implementation more
      closely with the spec text and removes a whole bunch of unnecessary
      code.
      
      This also moves the `await` instrumentation into runtime-debug.cc along
      with the other instrumentation methods for async functions.
      
      Bug: chromium:1280519, chromium:1277451, chromium:1246867
      Change-Id: I3fb543c76229091b502f3188da962784977158ab
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386597
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78610}
      302a5d20
    • Benedikt Meurer's avatar
      [debug] Simplify async function instrumentation. · 41f0c0ba
      Benedikt Meurer authored
      This unifies and simplifies the way we instrument async functions for
      the purpose of async stack traces and async stepping. It does so while
      retaining the observable behavior on the inspector level (for now).
      
      Previously we'd mark the implicit promise of the async function object
      with the async task ID, and whenever we awaited, we'd copy the async
      task ID to the throwaway promise that is created by the `await`. This
      however made things unnecessarily interesting in the following regards:
      
      1. We'd see `DebugDidHandle` and `DebugWillHandle` events after the
      `AsyncFunctionFinished` events, coming from the throwaway promises,
      while the implicit promise is "done". This is especially confusing
      with rejection propagation and requires very complex stepping logic
      for async functions (after this CL it'll be possible to unify and
      simplify the stepping logic).
      2. We have to thread through the "can suspend" information from the
      Parser all the way through AsyncFunctionReject/AsyncFunctionResolve
      to the async function instrumentation to decide whether to cancel the
      pending task when the async function finishes.
      
      This CL changes the instrumentation to only happen (non recurringly) for
      the throwaway promises allocated upon `await`. This solves both problems
      mentioned above, and works because upon the first `await` the stack
      captured for the throwaway promise will include the synchronous part as
      expected, while upon later `await`s the synchronous part will be empty
      and the asynchronous part will be the stack captured for the previous
      throwaway promise (and the V8Debugger automatically short circuits
      stacks with empty synchronous part).
      
      Bug: chromium:1280519, chromium:1277451, chromium:1246867
      Change-Id: Id604dabc19ea133ea2e9dd63181b1fc33ccb5eda
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3383775Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78599}
      41f0c0ba
    • Jakob Gruber's avatar
      [maps] Lock map_updater_access in CompleteInobjectSlackTracking · 4b8d0489
      Jakob Gruber authored
      CompleteInobjectSlackTracking potentially shrinks multiple maps, and
      the relation between these maps should be preserved in a concurrent
      environment. Thus it is not enough to make each modification
      atomically, but all related map modifications must be within a
      critical section.
      
      We do this by locking the map_updater_access mutex
      CompleteInobjectSlackTracking, and hence moving the function to the
      MapUpdater class.
      
      Bug: chromium:1274445,v8:7990
      Change-Id: If99bb8b55e03180128ee397d845fa4c269c4241e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3379819Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78597}
      4b8d0489
  12. 12 Jan, 2022 1 commit
  13. 11 Jan, 2022 1 commit
  14. 10 Jan, 2022 2 commits
  15. 05 Jan, 2022 1 commit
  16. 16 Dec, 2021 3 commits
  17. 14 Dec, 2021 2 commits
  18. 08 Dec, 2021 1 commit