1. 28 Feb, 2020 2 commits
  2. 26 Feb, 2020 3 commits
  3. 25 Feb, 2020 1 commit
  4. 24 Feb, 2020 1 commit
  5. 21 Feb, 2020 1 commit
  6. 19 Feb, 2020 3 commits
  7. 18 Feb, 2020 2 commits
  8. 13 Feb, 2020 1 commit
  9. 12 Feb, 2020 1 commit
    • Sigurd Schneider's avatar
      [coverage] Provide option to prevent triggered updates · 117520e2
      Sigurd Schneider authored
      Coverage updates are sent as deltas, and this means that it
      is very important that the consumer gets /all/ updates;
      otherwise, the coverage information will be wrong.
      
      Previously, we introduces the ability into the back-end to
      send triggered updates, i.e. updates that are triggered by
      the back-end at interesting points in time. These updates
      are delivered via an event, and any consumer must process
      these events.
      
      This CL introduces a flag to startPreciseCoverage that
      controls whether the back-end is allowed to send such
      triggered updates on its own initiative. The default is
      `false` to maintain backwards compatibility with consumers
      that don't yet handle the events.
      
      Bug: chromium:1022031
      Change-Id: Ie36a92a3b627b19ea4041f1b8da1ec66c6b9b771
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2043798Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66232}
      117520e2
  10. 10 Feb, 2020 2 commits
    • Shu-yu Guo's avatar
      Reland "[weakrefs] Schedule FinalizationGroup cleanup tasks from within V8" · 55a01ec7
      Shu-yu Guo authored
      Deprecate the following explicit FinalizationGroup APIs in favor of
      automatic handling of FinalizationGroup cleanup callbacks:
        - v8::Isolate::SetHostCleanupFinalizationGroupCallback
        - v8::FinaliationGroup::Cleanup
      
      If no HostCleanupFinalizationGroupCallback is set, then
      FinalizationGroup cleanup callbacks are automatically scheduled by V8
      itself as non-nestable foreground tasks.
      
      When a Context being disposed, all FinalizationGroups that are
      associated with it are removed from the dirty list, cancelling
      scheduled cleanup.
      
      This is a reland of 31d8ff7a
      
      Bug: v8:8179, v8:10190
      Change-Id: I704ecf48aeebac1dc2c05ea1c052f6a2560ae332
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2045723
      Commit-Queue: Shu-yu Guo <syg@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66208}
      55a01ec7
    • Joakim Bengtsson's avatar
      Improve V8 GC logic for external memory · 4b1447e4
      Joakim Bengtsson authored
      The logic for V8 GC normally only takes the external memory growth
      since last mark-compact into account. Unfortunately, the amount of
      external memory recorded at the end of MC is often too high. The
      reason is that it might take a while for the external memory
      associated with the GCed objects to be released (e.g. V8 itself post a
      task to release external memory for ArrayBuffer backing stores). In a
      worst case scenario GC is driven only by external memory and none of
      the external memory is released by the end of the MC. Then each MC
      will record the external memory at its highest point and the GC logic
      will allow the external memory to grow a bit higher each time which
      can lead to excessive memory use.
      
      This patch improves the situation a bit by calculating the growth from
      the lowest external memory seen since the last MC. That way the growth
      calculation will be offset from a level presumably closer to the
      intended one (to what it would have been if the external memory
      associated with the GCed objects was released during the MC). Now,
      this fix is not perfect because it can be thrown off by external
      memory growth occurring before the lingering memory is
      released. However, it seems to work rather well in practice (e.g. when
      playing MSE video on YT).
      
      Bug: v8:10185
      Change-Id: Ifcdd87eb45f3ae4a99d2aeec667c3ae4ca9a52b6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2042711Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66193}
      4b1447e4
  11. 09 Feb, 2020 1 commit
    • Michael Achenbach's avatar
      Revert "[weakrefs] Schedule FinalizationGroup cleanup tasks from within V8" · 72fc962b
      Michael Achenbach authored
      This reverts commit 31d8ff7a.
      
      Reason for revert: https://crbug.com/v8/10190
      
      Original change's description:
      > [weakrefs] Schedule FinalizationGroup cleanup tasks from within V8
      > 
      > Deprecate the following explicit FinalizationGroup APIs in favor of
      > automatic handling of FinalizationGroup cleanup callbacks:
      >   - v8::Isolate::SetHostCleanupFinalizationGroupCallback
      >   - v8::FinaliationGroup::Cleanup
      > 
      > If no HostCleanupFinalizationGroupCallback is set, then
      > FinalizationGroup cleanup callbacks are automatically scheduled by V8
      > itself as non-nestable foreground tasks.
      > 
      > When a Context being disposed, all FinalizationGroups that are
      > associated with it are removed from the dirty list, cancelling
      > scheduled cleanup.
      > 
      > Bug: v8:8179
      > Change-Id: Ic09313a11dd00af36d1f698250b3d735155f45e8
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1986392
      > Commit-Queue: Shu-yu Guo <syg@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66184}
      
      TBR=ulan@chromium.org,rmcilroy@chromium.org,syg@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:8179
      Change-Id: If7869e9a5841803c10e748691f019a7d28f3b62e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2043807Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66190}
      72fc962b
  12. 08 Feb, 2020 1 commit
  13. 07 Feb, 2020 1 commit
  14. 05 Feb, 2020 1 commit
  15. 04 Feb, 2020 3 commits
  16. 03 Feb, 2020 2 commits
    • Sigurd Schneider's avatar
      [debugger] Allow termination-on-resume when paused at a breakpoint · 9e52d5c5
      Sigurd Schneider authored
      This CL implements functionality to allow an embedder to mark a
      debug scope as terminate-on-resume. This results in a termination
      exception when that debug scope is left and execution is resumed.
      Execution of JavaScript remains possible after a debug scope is
      marked as terminate-on-resume (but before execution of the paused
      code resumes).
      This is used by blink to correctly prevent resuming JavaScript
      execution upon reload while being paused at a breakpoint.
      
      This is important for handling reloads while paused at a breakpoint
      in blink. The resume command terminates blink's nested message loop
      that is used while to keep the frame responsive while the debugger
      is paused. But if a reload is triggered while execution is paused
      on a breakpoint, but before execution is actually resumed from the
       breakpoint (that means before returning into the V8 JavaScript
      frames that are paused on the stack below the C++ frames that belong
      to the nested message loop), we re-enter V8 to do tear-down actions
      of the old frame. In this case Runtime.terminateExecution() cannot be
      used before Debugger.resume(), because the tear-down actions that
      re-enter V8 would trigger the termination exception and crash the
      browser (because the browser expected the tear-down to succeed).
      
      Hence we introduce this flag on V8 that says: It is OK if someone
      re-enters V8 (to execute JS), but upon resuming from the breakpoint
      (i.e. returning to the paused frames that are on the stack below),
      generate a termination exception.
      
      We deliberated adding a corresponding logic on the blink side (instead
      of V8) but we think this is the simplest solution.
      
      More details in the design doc:
      
      https://docs.google.com/document/d/1aO9v0YhoKNqKleqfACGUpwrBUayLFGqktz9ltdgKHMk
      
      Bug: chromium:1004038, chromium:1014415
      
      Change-Id: I896692d4c21cb0acae89c1d783d37ce45b73c113
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1924366
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66084}
      9e52d5c5
    • Jakob Kummerow's avatar
      [ptr-compr] Bump max string length to ~2**29 · ea56bf55
      Jakob Kummerow authored
      Without pointer compression, the max string length on 64-bit platforms
      used to be 2**30 (minus header). With pointer-compression, this was
      accidentally lowered to 2**28 (which is the historical limit for 32-bit
      platforms). This CL bumps the limit on 64-bit platforms to 2**29, which
      is the maximum we can support given that any heap object's size in bytes
      must fit into a Smi (which are now 31-bit on all 64-bit platforms, with
      or without pointer compression).
      
      Change-Id: I263544317d9e6137f6b6a044784a21f41a2761b0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030916Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66083}
      ea56bf55
  17. 31 Jan, 2020 1 commit
    • Peter Marshall's avatar
      [tools] Add a VMState for Atomics.wait · e8ba5699
      Peter Marshall authored
      We will use this state in devtools via the inspector to indicate
      whether a thread is currently stuck polling in atomics.wait.
      
      VMState already distinguishes the important states we care about which
      are idle vs. running JS. We also want to know the state for
      atomics.wait(), which is commonly used in WebWorkers to poll the main
      page for work to do.
      
      This CL just adds and maintains the state and adds assertions in
      atomics tests. Another CL will emit inspector notifications when the
      VMState changes in a way that the inspector cares about.
      
      Re-flow comments as a drive-by cleanup.
      
      Bug: chromium:1025490
      Change-Id: I961051bfb846aa20454a56214310370ea8e47d1c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033168
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66071}
      e8ba5699
  18. 30 Jan, 2020 2 commits
  19. 24 Jan, 2020 2 commits
  20. 23 Jan, 2020 1 commit
  21. 22 Jan, 2020 6 commits
  22. 20 Jan, 2020 1 commit
    • Sigurd Schneider's avatar
      [coverage] Add event for coverage reporting · ee8602d3
      Sigurd Schneider authored
      This CL adds a new event that enables the back-end to send coverage
      updates on its own initiative. This event can be triggered via the C++
      method `triggerPreciseCoverageDeltaUpdate` on the agent in a way that
      causes coverage data to be immediatelly collected.
      
      This is useful in the back-end to collect coverage at a certain point
      in time, i.e. when a lifecycle event such as first contentful paint
      occurs.
      
      The previous interface could not support this, because it could not
      reasonably be triggered from C++, and if triggered through the protocol,
      dispatching messages added delay that invalidated the data (i.e. data
      might have been taken too late to be accurate).
      
      TBR=yangguo@chromium.org
      
      Change-Id: I0f7201412a8d64866e6e314e5bc850354c13a9da
      Bug: chromium:1022031
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1992437
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65864}
      ee8602d3
  23. 19 Jan, 2020 1 commit
    • Ulan Degenbaev's avatar
      [api] New v8::Isolate::MeasureMemory API with per-context sizes · 80242048
      Ulan Degenbaev authored
      This adds a new API function that can be customized by the embedder
      by providing a delegate that defines contexts to be measured and
      reports the results to JS.
      
      A memory measurement request is carried out as follows:
      
      1) MeasureMemory(delegate) invocation enqueues a new request in
         MemoryMeasurement::received_ and schedules a delayed GC task.
      
      2) At the start of the next GC (that is triggered either by the
         GC schedule or by the delayed task) each request in received_
         moves to processing_. Per-context marking worklists are created
         for each native context that was selected by the delegates
         (using the ShouldMeasure predicate).
      
      3) At the end of the GC the sizes of the native contexts are
         recorded for each request in processing_. The requests move
         to the done_ list and result reporting task is scheduled.
      
      4) When the result reporting task runs it invokes the
         MeasurementComplete function of each delegate in done_.
      
      
      Bug: chromium:973627
      
      Change-Id: I0254cae693c5b8fab7c85a9eca0a3a128210b6c4
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1981493
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65856}
      80242048