1. 26 Nov, 2020 2 commits
  2. 25 Nov, 2020 1 commit
    • Michael Lippautz's avatar
      cppgc: Refactor write barriers · e8813049
      Michael Lippautz authored
      Refactor write barriers and split calls, as e.g. DijkstraWriteBarrier
      also contained logic for recording slots (cards) for the young
      generation.
      
      The new API exposes the following:
      - GetWriteBarrierType(): Retrieving the type of barrier that must be
        emitted;
      - DijkstraWriteBarrier(), DijkstraWriteBarrierRange(): Dijkstra-style
        write barriers;
      - SteeleWriteBarrier(): Steele-style write barrier;
      - GenerationalBarrier(): Barrier for recording slots when using
        multiple generations;
      
      Compilers running with -O3 optimize the DijkstraWriteBarrierPolicy
      down to the same instructions as before the split.
      
      Change-Id: If68839cc6357b2f568986c9ce8ca753b1e96a70a
      Bug: chromium:1056170
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2557514
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71407}
      e8813049
  3. 24 Nov, 2020 2 commits
    • Michael Lippautz's avatar
      cppgc: Expose write barriers · 3b82f4c6
      Michael Lippautz authored
      Exposes an opaque handle for uniformly (cppgc and V8) referring to an
      instance of a heap.
      
      Exposes a set of raw write barriers for advances embedders through
      subtle::HeapConsistency which is a mirror into write barrier internals.
      The following barriers are exposed:
      - DijkstraWriteBarrier: Regular Dijkstra-style write barrier (add to
        wavefront);
      - DijkstraWriteBarrierRange: Same as DijkstraWriteBarrier but
        operating on a range of slots that are composite (inlined) objects;
      - SteeleWriteBarrier: Regular Steele-style write barrier (retreating
        wavefront);
      
      Change-Id: Ib5ac280204686bf887690f72df1cdb506ea6ef70
      Bug: chromium:1056170
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2554601Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71381}
      3b82f4c6
    • Omer Katz's avatar
      cppgc: Fix cppgc build · 0e0d1b0d
      Omer Katz authored
      The CPPGC_BUILD_IN_V8 define (used for tracing) isn't propagated from
      v8_base_without_compiler to cppgc_base, which breaks build with
      perfetto. Instead use a gn args to specify standalone builds (defaulted
      to false) and use that to choose the right tracing implementation.
      
      Bug: chromium:1056170
      Change-Id: I70bce819d45fb133b6f932a50a5d027e39f3e5b9
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2555007
      Auto-Submit: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71356}
      0e0d1b0d
  4. 21 Nov, 2020 1 commit
  5. 20 Nov, 2020 2 commits
  6. 19 Nov, 2020 4 commits
  7. 17 Nov, 2020 1 commit
  8. 16 Nov, 2020 1 commit
  9. 30 Oct, 2020 1 commit
  10. 23 Oct, 2020 1 commit
    • Omer Katz's avatar
      Reland "cppgc: Port backing store compaction." · b5979eaa
      Omer Katz authored
      This is a reland of 90ea9b35
      
      Original change's description:
      > cppgc: Port backing store compaction.
      >
      > This CL ports the existing backing store compaction algorithm from
      > blink. It does not attempt to improve on the existing algorithm.
      >
      > Currently only unified heap uses the compaction implementation. It is
      > never triggered through standalone GCs.
      >
      > The compaction implementation resides within an internal "subtle" namespace.
      >
      > Bug: v8:10990
      > Change-Id: I4aa781db1b711e7aafc34234c4fb142de84394d7
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2485228
      > Commit-Queue: Omer Katz <omerkatz@chromium.org>
      > Reviewed-by: Anton Bikineev <bikineev@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#70714}
      
      Bug: v8:10990
      Change-Id: I527c2042a26648d058bfe4d355527cce9a3eeadc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2492331
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70736}
      b5979eaa
  11. 22 Oct, 2020 4 commits
  12. 21 Oct, 2020 1 commit
  13. 19 Oct, 2020 2 commits
  14. 15 Oct, 2020 1 commit
  15. 14 Oct, 2020 2 commits
  16. 09 Oct, 2020 2 commits
  17. 08 Oct, 2020 2 commits
  18. 07 Oct, 2020 1 commit
    • Omer Katz's avatar
      cppgc, jobs: Update job priority · 4cb4a229
      Omer Katz authored
      This CL aligns the library implementation with the blink implementation:
      (*) Concurrent marking increases job priority if no concurrent progress
          is made in the last 50% of the expected marking duration.
      (*) Concurrent sweeping increases job priority when calling
          FinishIfRunning (the library equivalent of blink's CompleteSweep).
      
      Bug: chromium:1056170
      Change-Id: Ice275cb90a7dd76bf4125f4338d9d80e5f576c58
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2431572
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70375}
      4cb4a229
  19. 06 Oct, 2020 4 commits
  20. 02 Oct, 2020 3 commits
    • Omer Katz's avatar
      cppgc: Various marking data races · 69d507ca
      Omer Katz authored
      This resolves several races identified by concurrent marking tests.
      These include:
      (*) Several instances of not using atomic accesses.
      (*) Synchronizing page on page creation.
      
      Bug: chromium:1056170
      Change-Id: I4a32a44b93a6995a11e3cc75c9446fb8860ae780
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423717
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70287}
      69d507ca
    • Omer Katz's avatar
      cppgc: Clear object memory on sweep · 8b1a3a73
      Omer Katz authored
      We clear during sweep so that we are guaranteed the in-construction bit
      of newly allocated objects is always 0. The lock sweeping uses for
      synchronization assures no data races between clearing and concurrent
      marking.
      
      The only exception to that is debug builds that zap on sweep and clear
      on allocation. This makes it so that dangling references will most
      likely crash in debug builds.
      
      Bug: chromium:1056170
      Change-Id: I12597ef76629ec50c6bfc39dc21b68243c4160ae
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2438530
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70283}
      8b1a3a73
    • Omer Katz's avatar
      cppgc: Mark in construction objects externally · cebd8b65
      Omer Katz authored
      In construction objects don't have anything to sync with on the
      allocation side since they weren't marked as fully constructed yet.
      This could mean the initialization of the marking bit on the mutator
      thread and setting the mark bit on a concurrent thread could race
      (potentially resulting in losing the mark bit when the gc info index
      overwrites it).
      
      This CL fixes this issue by using a set of in construction objects.
      In construction objects are no longer marked. Instead they are pushed
      to the set and the heap object header is marked when they are popped
      from the worklist. Since the set avoids duplicates, this allows us to
      both avoid worklist explosion (due to pushing the same in construction
       object multiple times) and avoid the data race on the mark bit.
      
      This CL uses an unordered_set to record objects. Synchronization uses
      a lock, which could be costly but is not expected to be obtained often.
      
      Bug: chromium:1056170
      Change-Id: I366b59f476c166ff06e15b280df9e846034cc6cf
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2437388
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70282}
      cebd8b65
  21. 01 Oct, 2020 1 commit
    • Michael Lippautz's avatar
      cppgc: Move ProcessWeakness into FinishMarking · 20e1ba28
      Michael Lippautz authored
      For cross-thread handling we require the atomic marking pause to
      provide an atomically consistent view of markbits and weak references.
      This is ensured by locking the whole atomic pause from entering to
      weak processing.
      
      This CL move ProcessWeakness() into FinishMarking() which allows to
      nicely scope the upcomming lock from EnterAtomicPause() to
      LeaveAtomicPause(). The alternative is requiring the caller to ensure
      proper locking which is harder than ensuring that the Marker is
      consistent.
      
      Bug: chromium:1056170
      Change-Id: Ib6028a0d76fcf9422c4a0d422fec3d568f106bf2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2442620
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70259}
      20e1ba28
  22. 28 Sep, 2020 1 commit