1. 04 Aug, 2020 1 commit
    • Dominik Inführ's avatar
      Reland "[heap] Refactor allocation observer in AllocationCounter" · 9fff9a73
      Dominik Inführ authored
      This is a reland of b354e344
      
      This CL adds 3 fixes:
      
      * Unprotect code object before creating filler
      * Allows AllocationObserver::Step to add more AllocationObservers
      * Update limit in NewSpace::UpdateLinearAllocationArea
      
      Original change's description:
      > [heap] Refactor allocation observer in AllocationCounter
      >
      > Moves accounting of allocation observers into the AllocationCounter
      > class. This CL removes top_on_previous_step_ for counters that are
      > increased regularly in the slow path of the allocation functions.
      >
      > AdvanceAllocationObservers() informs the AllocationCounter about
      > allocated bytes, InvokeAllocationObservers() needs to be invoked when
      > an allocation step is reached. NextBytes() returns the number of bytes
      > until the next AllocationObserver::Step needs to run.
      >
      > Bug: v8:10315
      > Change-Id: I8b6eb8719ab032d44ee0614d2a0f2645bfce9df6
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320650
      > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69170}
      
      Bug: v8:10315
      Change-Id: I89ab4d5069a234a293471f613dab16b47d8fff89
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332805Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69216}
      9fff9a73
  2. 01 Aug, 2020 1 commit
    • Dominik Inführ's avatar
      Revert "[heap] Refactor allocation observer in AllocationCounter" · ef603a9e
      Dominik Inführ authored
      This reverts commit b354e344.
      
      Reason for revert: Clusterfuzz found issues with this CL.
      
      Original change's description:
      > [heap] Refactor allocation observer in AllocationCounter
      > 
      > Moves accounting of allocation observers into the AllocationCounter
      > class. This CL removes top_on_previous_step_ for counters that are
      > increased regularly in the slow path of the allocation functions.
      > 
      > AdvanceAllocationObservers() informs the AllocationCounter about
      > allocated bytes, InvokeAllocationObservers() needs to be invoked when
      > an allocation step is reached. NextBytes() returns the number of bytes
      > until the next AllocationObserver::Step needs to run.
      > 
      > Bug: v8:10315
      > Change-Id: I8b6eb8719ab032d44ee0614d2a0f2645bfce9df6
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320650
      > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69170}
      
      TBR=ulan@chromium.org,dinfuehr@chromium.org
      
      Change-Id: Icd713207bfb2085421fd82009be24a0211ae86da
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10315
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332667Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69187}
      ef603a9e
  3. 31 Jul, 2020 1 commit
    • Dominik Inführ's avatar
      [heap] Refactor allocation observer in AllocationCounter · b354e344
      Dominik Inführ authored
      Moves accounting of allocation observers into the AllocationCounter
      class. This CL removes top_on_previous_step_ for counters that are
      increased regularly in the slow path of the allocation functions.
      
      AdvanceAllocationObservers() informs the AllocationCounter about
      allocated bytes, InvokeAllocationObservers() needs to be invoked when
      an allocation step is reached. NextBytes() returns the number of bytes
      until the next AllocationObserver::Step needs to run.
      
      Bug: v8:10315
      Change-Id: I8b6eb8719ab032d44ee0614d2a0f2645bfce9df6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320650
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69170}
      b354e344
  4. 27 Jul, 2020 1 commit
  5. 24 Jul, 2020 2 commits
  6. 23 Jul, 2020 1 commit
  7. 20 Jul, 2020 1 commit
  8. 17 Jul, 2020 1 commit
  9. 19 Jun, 2020 1 commit
  10. 18 Jun, 2020 1 commit
    • Dan Elphick's avatar
      Reland "[heap] Make ReadOnlySpace use bump pointer allocation" · 32b911f9
      Dan Elphick authored
      This reverts commit f78d69fa.
      
      With https://chromium-review.googlesource.com/c/v8/v8/+/2243216,
      incorrect MemoryChunk::FromHeapObject uses are now fixed.
      
      Original change's description:
      > Revert "[heap] Make ReadOnlySpace use bump pointer allocation"
      > 
      > This reverts commit 81c34968 and also
      > 490f3580 which depends on the former.
      > 
      > Reason for revert: Break CFI tests in chromium https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI/17438
      > Original change's description:
      > > [heap] Make ReadOnlySpace use bump pointer allocation
      > >
      > > This changes ReadOnlySpace to no longer be a PagedSpace but instead it
      > > is now a BaseSpace. BasicSpace is a new base class that Space inherits
      > > from and which has no allocation methods and does not dictate how the
      > > pages should be held.
      > >
      > > ReadOnlySpace unlike Space holds its pages as a
      > > std::vector<ReadOnlyPage>, where ReadOnlyPage directly subclasses
      > > BasicMemoryChunk, meaning they do not have prev_ and next_ pointers and
      > > cannot be held in a heap::List. This is desirable since with pointer
      > > compression we would like to remap these pages to different memory
      > > addresses which would be impossible with a heap::List.
      > >
      > > Since ReadOnlySpace no longer uses most of the code from the other
      > > Spaces it makes sense to simplify its memory allocation to use a simple
      > > bump pointer and always allocate a new page whenever an allocation
      > > exceeds the remaining space on the final page.
      > >
      > > Change-Id: Iee6d9f96cfb174b4026ee671ee4f897909b38418
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209060
      > > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#68137}
      > 
      > TBR=ulan@chromium.org,delphick@chromium.org
      > 
      > # Not skipping CQ checks because original CL landed > 1 day ago.
      > 
      > Change-Id: I68c9834872e55eb833be081f8ff99b786bfa9894
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232552
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Reviewed-by: Dan Elphick <delphick@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#68211}
      
      TBR=ulan@chromium.org,delphick@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Change-Id: Id5b3cce41b5dec1dca816c05848d183790b1cc05
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2250254Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68407}
      32b911f9
  11. 12 Jun, 2020 1 commit
  12. 05 Jun, 2020 1 commit
    • Dan Elphick's avatar
      Revert "[heap] Make ReadOnlySpace use bump pointer allocation" · f78d69fa
      Dan Elphick authored
      This reverts commit 81c34968 and also
      490f3580 which depends on the former.
      
      Reason for revert: Break CFI tests in chromium https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI/17438
      Original change's description:
      > [heap] Make ReadOnlySpace use bump pointer allocation
      >
      > This changes ReadOnlySpace to no longer be a PagedSpace but instead it
      > is now a BaseSpace. BasicSpace is a new base class that Space inherits
      > from and which has no allocation methods and does not dictate how the
      > pages should be held.
      >
      > ReadOnlySpace unlike Space holds its pages as a
      > std::vector<ReadOnlyPage>, where ReadOnlyPage directly subclasses
      > BasicMemoryChunk, meaning they do not have prev_ and next_ pointers and
      > cannot be held in a heap::List. This is desirable since with pointer
      > compression we would like to remap these pages to different memory
      > addresses which would be impossible with a heap::List.
      >
      > Since ReadOnlySpace no longer uses most of the code from the other
      > Spaces it makes sense to simplify its memory allocation to use a simple
      > bump pointer and always allocate a new page whenever an allocation
      > exceeds the remaining space on the final page.
      >
      > Change-Id: Iee6d9f96cfb174b4026ee671ee4f897909b38418
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209060
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#68137}
      
      TBR=ulan@chromium.org,delphick@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Change-Id: I68c9834872e55eb833be081f8ff99b786bfa9894
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232552
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68211}
      f78d69fa
  13. 03 Jun, 2020 2 commits
    • Dan Elphick's avatar
      [heap] Make ReadOnlySpace use bump pointer allocation · 81c34968
      Dan Elphick authored
      This changes ReadOnlySpace to no longer be a PagedSpace but instead it
      is now a BaseSpace. BasicSpace is a new base class that Space inherits
      from and which has no allocation methods and does not dictate how the
      pages should be held.
      
      ReadOnlySpace unlike Space holds its pages as a
      std::vector<ReadOnlyPage>, where ReadOnlyPage directly subclasses
      BasicMemoryChunk, meaning they do not have prev_ and next_ pointers and
      cannot be held in a heap::List. This is desirable since with pointer
      compression we would like to remap these pages to different memory
      addresses which would be impossible with a heap::List.
      
      Since ReadOnlySpace no longer uses most of the code from the other
      Spaces it makes sense to simplify its memory allocation to use a simple
      bump pointer and always allocate a new page whenever an allocation
      exceeds the remaining space on the final page.
      
      Change-Id: Iee6d9f96cfb174b4026ee671ee4f897909b38418
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209060
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68137}
      81c34968
    • Dan Elphick's avatar
      [heap] Move MemoryChunk fields to BasicMemoryChunk · ae489dec
      Dan Elphick authored
      This moves several fields that will be needed by ReadOnlySpace pages
      when it stops using MemoryChunk into BasicMemoryChunk.
      
      Additionally AllocationStats is moved from spaces.h into
      allocation-stats.h.
      
      Bug: v8:10473, v8:10454
      Change-Id: I76a66565a260126e629bd7588a5418267dfa8423
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228722Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68134}
      ae489dec
  14. 26 May, 2020 1 commit
  15. 18 May, 2020 1 commit
  16. 15 May, 2020 2 commits
  17. 14 May, 2020 1 commit
  18. 13 May, 2020 1 commit
  19. 08 May, 2020 1 commit
  20. 05 May, 2020 1 commit
  21. 04 May, 2020 1 commit
  22. 30 Apr, 2020 1 commit
  23. 28 Apr, 2020 4 commits
  24. 22 Apr, 2020 1 commit
  25. 15 Apr, 2020 1 commit
  26. 09 Apr, 2020 1 commit
  27. 06 Mar, 2020 1 commit
  28. 12 Feb, 2020 1 commit
  29. 11 Feb, 2020 1 commit
  30. 10 Feb, 2020 2 commits
  31. 15 Jan, 2020 1 commit
    • Leszek Swirski's avatar
      [offthread] Add OffThreadFactory · e659917a
      Leszek Swirski authored
      Introduce OffThreadFactory with initial string construction support.
      
      The OffThreadFactory shares with Factory a new CRTP base class, called
      FactoryBase. Methods in FactoryBase return a FactoryHandle<Factory, T>
      alias, which is Handle<T> for normal Factory and a new OffThreadHandle<T>
      for OffThreadFactory. OffThreadHandle<T> behaves like Handle<T>, except
      it stores the object in-line rather than needing external storage.
      
      Any shared factory methods are moved into FactoryBase, which uses CRTP
      to call the sub-class's AllocateRaw method (plus a few more customization
      points which need Isolate access on the main thread).
      
      Methods that used to take an Isolate or Factory, and are needed off the
      main thread, are now expected to be templated on the factory type and
      to use the appropriate handle.
      
      Once an OffThreadFactory has finished being used (e.g. off-thread
      compilation completed) its pages are "Published" into the main-thread
      Heap. To deal with string internalization without creating a bunch of
      ThinStrings, this is done in two stages:
      
        1. 'FinishOffThread': The off-thread pages are walked to
           collect all slots pointing to "internalized" strings. After this is
           called it is invalid to allocate any more objects with the factory.
        2. 'Publish': On the main thread, we transform these slots into
           <Handle to holder, offset> pairs, then for each saved slot
           re-internalize its string and update the slot to point to the
           internalized string.
      
      Bug: chromium:1011762
      Change-Id: I008a694da3c357de34362bd86fe7e1f46b535d5e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1992434
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65787}
      e659917a
  32. 09 Jan, 2020 1 commit
  33. 17 Dec, 2019 1 commit