1. 13 May, 2022 1 commit
  2. 28 Mar, 2022 1 commit
    • Dominik Inführ's avatar
      [heap] Initialize pages with placement-new · a8471820
      Dominik Inführ authored
      Define ctors for BasicMemoryChunk, ReadOnlyPage, MemoryChunk, Page and
      LargePage. We can use those with placement-new to initialize pages. We
      now initialize chunks at once either for ReadOnlyPage, Page or
      LargePage. Previously initialization happened in multiple locations
      starting with BasicMemoryChunk::Initialize.
      
      Adding ctors to these classes should improve debugging, since debug
      info for classes without ctors was removed with the compiler flag
      `-fuse-ctor-homing`.
      
      Change-Id: Ib842bb9b1e93a6576cad8299b7c5dbfe299baa33
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3545092Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79638}
      a8471820
  3. 19 Oct, 2021 1 commit
  4. 27 Aug, 2021 1 commit
    • Michael Lippautz's avatar
      Reland "Reland "heap: Use generic flags for main-thread only flags"" · 937f4c7f
      Michael Lippautz authored
      This is a reland of 80f10346
      
      Original change's description:
      > Reland "heap: Use generic flags for main-thread only flags"
      >
      > This is a reland of 2a8e2a9b
      >
      > Original change's description:
      > > heap: Use generic flags for main-thread only flags
      > >
      > > BasicMemoryChunk flags should only be mutated from the main thread
      > > when no concurrent task can access them. For that purpose it is enough
      > > to use regular non-atomic flags as they are immutable while the GC is
      > > running.
      > >
      > > Change-Id: I0a9f8ecb2eb2aafaf17e77626ae27604abd1b618
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3107230
      > > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > > Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      > > Cr-Commit-Position: refs/heads/main@{#76471}
      >
      > Change-Id: Iaf495546f82291ab674537f5d39e10d0495ac612
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3117486
      > Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#76506}
      
      Change-Id: I662bccdf94fc53efcdd209f85d6b044786dee250
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3123412
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76528}
      937f4c7f
  5. 26 Aug, 2021 2 commits
  6. 24 Aug, 2021 2 commits
  7. 22 Mar, 2021 1 commit
  8. 10 Jul, 2020 1 commit
  9. 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
  10. 17 Jun, 2020 1 commit
    • Dan Elphick's avatar
      [heap] Use BasicMemoryChunk::FromHeapObject more · 6f267e8a
      Dan Elphick authored
      Since ReadOnlySpace pages will soon not be MemoryChunks, change most
      uses of MemoryChunk::FromHeapObject and FromAddress to use the
      BasicMemoryChunk variants and which use the new MemoryChunk::cast
      function that takes a BasicMemoryChunk and DCHECKs !InReadOnlySpace().
      
      To enable this, it also moves into BasicMemoryChunk several MemoryChunk
      functions that just require a BasicMemoryChunk.
      
      Bug: v8:10454
      Change-Id: I80875b2c2446937ac2c2bc9287d36e71cc050c38
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2243216
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68390}
      6f267e8a
  11. 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
  12. 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
  13. 13 May, 2020 1 commit
  14. 23 Oct, 2019 1 commit
  15. 11 Jul, 2019 1 commit
    • Maciej Goszczycki's avatar
      [roheap] Add BasicMemoryChunk · 01db8ede
      Maciej Goszczycki authored
      BasicMemoryChunk sits above the MemoryChunk in the chunk hierarchy and
      is responsible for storing the bare minimum data to identify a chunk of
      memory, without worrying about GC etc.
      
      This change also completes the MemoryChunk offset asserts, which were
      previously missing for few key properties.
      
      Bug: v8:7464
      Change-Id: Id4c7716c4ed5722ceca3cbc66d668aed016c74b0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1688843
      Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62652}
      01db8ede