1. 11 Aug, 2020 1 commit
    • Ulan Degenbaev's avatar
      [heap] Split marking worklist into global worklist and local worklists · 28133adc
      Ulan Degenbaev authored
      This is the first step in refactoring Worklist to allow arbitrary
      number of local worklists with private segments:
      - Introduce MarkingWorklistImpl<> which will eventually replace
        (and will be renamed to) Worklist.
      - MarkingWorklistImpl<> owns the global pool of segments but does not
        keep track of private segments.
      - MarkingWorklistImpl<>::Local owns private segments and can be
        constructed dynamically on background threads.
      - Rename the existing MarkingWorklistsHolder to MarkingWorklists.
      - Rename the existing MarkingWorklists to MarkingWorklists::Local.
      - Rename the existing marking_workists_holder to marking_worklists.
      - Rename the existing marking_worklists to local_marking_worklists.
      
      Design doc: https://bit.ly/2XMtjLi
      Bug: v8:10315
      
      Change-Id: I9da34883ad34f4572fccd40c51e51eaf50c617bc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2343330Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69330}
      28133adc
  2. 29 Jan, 2020 1 commit
  3. 09 Jan, 2020 1 commit
    • Ulan Degenbaev's avatar
      [heap] Implement per-context marking worklist draining · e27e6fd6
      Ulan Degenbaev authored
      This changes the marking worklist draining for the main thread
      marker and the concurrent marker to use the following algorithm in
      per-context mode:
      1) Pop an object from the marking worklist.
      2) Try to infer the native context that owns the objects.
         This is done using a new NativeContextInferrer class.
      3) If the inference is successful, then change the active marking
         worklist to the worklist of the inferred native context.
      4) Otherwise, keep the current active marking worklist.
      5) Visit the object. Newly discovered objects will be pushed
         onto the active marking worklist.
      6) Account the object size for the native context corresponding
         to the active marking worklist.
         This is done using a new NativeContextStats class.
      
      The main property of the algorithm is that each object for which
      we couldn't infer the native context is either attributed to
      the native context retaining it or is not attributed to any native
      context.
      
      Bug: chromium:973627
      
      Change-Id: Ide4ab992275d115279f971d89ace657f4c05e176
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1981491
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65663}
      e27e6fd6
  4. 20 Dec, 2019 1 commit
  5. 11 Dec, 2019 1 commit
    • Ulan Degenbaev's avatar
      [heap] Refactor marking worklists · 6b5bc5e9
      Ulan Degenbaev authored
      This unifies marking worklists handling by the main thread marker and
      by the concurrent markers. A new class called MarkingWorklistsHolder
      owns all marking worklists: the default worklist, the on-hold worklist,
      and the embedder worklist. Each thread creates a local view of the
      marking worklists by creating an instance of MarkingWorklists.
      
      Additionally, marking visitors now work on MarkingWorklists instead of
      accessing each worklist individually.
      
      Besides cleaning the code up, this CL provides a bottleneck for
      implementing per-context worklists.
      
      Bug: chromium:973627
      Change-Id: I52ad65c94bc0695287ba7bf4d8a814a9035e2888
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1941947Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65421}
      6b5bc5e9