1. 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
  2. 17 Sep, 2020 1 commit
    • Omer Katz's avatar
      cppgc: Support incremental marking without non-nested tasks · 58ca454f
      Omer Katz authored
      For the standalone library, some platform implementations might not
      support non-nested tasks. We can still offer incremental marking in
      such cases using regular tasks and without assuming an empty stack.
      (cppgc's default platform e.g. doesn't support non-nested tasks.)
      
      This CL also updates GCInvoker to not trigger an incremental GC if we
      won't be able to finalize it. That makes finalizing through an
      non-nested incremental task safe.
      
      Bug: chromium:1056170
      Change-Id: I85f0c9f2efe643cb87dd65d80417eea0d6ee5d52
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2414217
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69971}
      58ca454f
  3. 28 Aug, 2020 2 commits
    • Omer Katz's avatar
      cppgc: Port incremental marking schedule · f13c55d7
      Omer Katz authored
      Schedule is simpler compared to the schedule in blink since it now
      returns deadlines based on marked bytes instead of time.
      
      If marking is ahead of schedule, return the minimum step size.
      Otherwise, set step size to catch up to schedule (ignoring the time
      passed while performing the step).
      No more default initial step size (needed in blink since marking speed
      was unknown).
      If estimated schedule is exceeded (marking takes longer than 500ms), the
      steps will try to mark all remaining objects but would still be capped
      by the maximum step duration of 2ms.
      
      Bug: chromium:1056170
      Change-Id: I09857db161c621a12d064f9c8c21b646c34f9d71
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2375200
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69602}
      f13c55d7
    • Omer Katz's avatar
      cppgc: Eliminate marking boilerplate · 18ff5660
      Omer Katz authored
      Starting marking required Creating a Marker and calling StartMarking.
      StartMarking should always have been called immediately after creating
      the marker.
      Since markers are not persisted between GC (a marker exists only while
      marking is in progress), it makes sense to start marking implicitly when
      a marker is created.
      
      Calling StartMarking in MarkerBase ctor is inadvisable since subclasses
      might still to initialize fields.
      Using MarkerFactory instead guarantees that StartMarking is always
      called immediately after creating a Marker.
      
      Bug: chromium:1056170
      Change-Id: Icbf11afd848e1618c204ca6bf951600b3ae9fef2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2375199
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69601}
      18ff5660
  4. 20 Aug, 2020 1 commit
    • Omer Katz's avatar
      cppgc: Add marked bytes deadline · 808a775f
      Omer Katz authored
      This CL adds a bytes based deadline to draining of worklist.
      The time based deadline is also kept because:
      1) Unified heap can't transition to bytes-based deadlines yet.
      2) Unified heap with concurrent marking needs to flush v8 references
         which don't count as marked_bytes and can cause very long incremental
         pauses.
      
      Bug: chromium:1056170
      Change-Id: I5ab57754e7ff0b5821f3acb76e1e6f59fc9d68b8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2299374Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69506}
      808a775f
  5. 19 Aug, 2020 1 commit
    • Omer Katz's avatar
      cppgc: Initial incremental marking implementation. · 132727fd
      Omer Katz authored
      This CL adds a basic implementation of incremental marking for standalone GC.
      Followup CLs include:
      * Use bytes instead of time as deadline
      * Port incremental marking schedule from blink
      * Mark on allocation
      * Guarantees for progres/termination for standalone GC
      * etc...
      
      Calling StartIncrementalGarbageCollection triggers StartMarking which
      schedules incremental marking as non-nestable tasks.
      For unified heap, marking will continue running until it runs out of
      work but it won't finalize independently.
      For standalone, when incremental runs out of work it will schedule a new
      task in which it will finalize marking and trigger the rest of the GC.
      Users of standalone can also force finalization before incremental
      marking as finished using FinalizeIncrementalGarbageCollectionIfRunning.
      Calling CollectGarbage would also finalize an on-going incremental GC
      if one exists. Otherwise it will trigger an atomic GC.
      
      See the following doc for explanation of the various methods:
      https://docs.google.com/document/d/1ZhJY2fOoD8sH53ZxMh2927Zl8sXqA7azJgcQTWx-YKs/edit?usp=sharing
      
      Bug: chromium:1056170
      Change-Id: I75ead414eb9da9f8b7f71c4638b9830fce7708ca
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2298009
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69480}
      132727fd
  6. 16 Jul, 2020 1 commit
  7. 10 Jul, 2020 1 commit
  8. 03 Jul, 2020 2 commits
  9. 02 Jul, 2020 1 commit
  10. 01 Jul, 2020 1 commit
  11. 22 Jun, 2020 1 commit
  12. 17 Jun, 2020 1 commit
  13. 16 Jun, 2020 2 commits