1. 09 Jan, 2020 1 commit
  2. 22 Nov, 2019 1 commit
  3. 04 Nov, 2019 2 commits
    • Dan Elphick's avatar
      Reland "Reland: [builtins] Move non-JS linkage builtins code objects into RO_SPACE" · 352bbb12
      Dan Elphick authored
      This is a reland of 855591a5
      
      Fixes break in builds that verify ReadOnlyHeap by relaxing the requirement for
      Code objects to be in CODE_SPACE in PagedSpaceObjectIterator::FromCurrentPage.
      
      Original change's description:
      > Reland: [builtins] Move non-JS linkage builtins code objects into RO_SPACE
      >
      > Reland of https://chromium-review.googlesource.com/c/v8/v8/+/1795358.
      >
      > [builtins] Move non-JS linkage builtins code objects into RO_SPACE
      >
      > Creates an allow-list of builtins that can still go in code_space
      > including all TFJ builtins and a small manual list that should be pared
      > down in the future.
      >
      > For builtins that go in RO_SPACE a Code object is created that contains an
      > immediate trap instruction. Generally these Code objects are still no
      > smaller than CODE_SPACE Code objects because of the Code object alignment
      > requirements. This will hopefully be addressed in a follow-up CL either by
      > relaxing them or removing the instruction stream completely.
      >
      > In the snapshot, this reduces code_space from ~152k to ~40k (-112k) and
      > increases by the same amount.
      >
      > Change-Id: I76661c35c7ea5866c1fb16e87e87122b3e3ca0ce
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893336
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#64700}
      
      Change-Id: I4eeb7dab3027b42fa58c5dfb2bad9873e9fff250
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893192
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64728}
      352bbb12
    • Dan Elphick's avatar
      [heap] Enable Verify for RO_SPACE when it is shared · fea98b6f
      Dan Elphick authored
      This re-enables verification for RO_SPACE when V8_SHARED_RO_HEAP is
      defined. This required refactoring PagedSpaceObjectIterator and methods
      in its calling chain to explicitly pass the PagedSpace and Heap pointers
      through as they cannot be obtained from the Page in this mode.
      
      Also removes unused Page::Print() method.
      
      Bug: v8:7464
      Change-Id: Ibc2c147a7bde6723f43bbaf93cf1db93e76c611e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893350Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64722}
      fea98b6f
  4. 31 Oct, 2019 2 commits
  5. 28 Oct, 2019 1 commit
    • Seth Brenith's avatar
      [torque] Use generated instance types, part 1 · 91e6421c
      Seth Brenith authored
      This change begins making use of the fact that Torque now knows about
      the relationship between classes and instance types, to replace a few
      repetitive lists:
      
      - Instance type checkers (single and range), defined in
        src/objects/instance-type.h
      - Verification dispatch in src/diagnostics/objects-debug.cc
      - Printer dispatch in src/diagnostics/objects-printer.cc
      - Postmortem object type detection in
        tools/debug_helper/get-object-properties.cc
      
      Torque is updated to generate four macro lists for the instance types,
      representing all of the classes separated in two dimensions: classes
      that correspond to a single instance type versus those that have a
      range, and classes that are fully defined in Torque (with fields and
      methods inside '{}') versus those that are only declared. The latter
      distinction is useful because fully-defined classes are guaranteed to
      correspond to real C++ classes, whereas only-declared classes are not.
      
      A few other changes were required to make the lists above work:
      
      - Renamed IsFiller to IsFreeSpaceOrFiller to better reflect what it does
        and avoid conflicts with the new macro-generated IsFiller method. This
        is the part I'm most worried about: I think the new name is an
        improvement for clarity and consistency, but I could imagine someone
        typing IsFiller out of habit and introducing a bug. If we'd prefer to
        keep the name IsFiller, my other idea is to rename FreeSpace to
        VariableSizeFiller and Filler to FixedSizeFiller.
      - Made Tuple3 extend from Struct, not Tuple2, because IsTuple2 is
        expected to check for only TUPLE2_TYPE and not include TUPLE3_TYPE.
      - Normalized the dispatched behavior for BigIntBase and HeapNumber.
      - Added a few new object printers.
      
      Bug: v8:7793
      Change-Id: I5462bb105f8a314baa59bd6ab6ab6215df6f313c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1860314
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64597}
      91e6421c
  6. 23 Oct, 2019 2 commits
    • Dominik Inführ's avatar
      [heap] Remove MemoryChunk::FromAnyPointerAddress · 9c8f8fad
      Dominik Inführ authored
      This function was only used for the write barrier since the store
      buffer only stored slots and needed a way to get to the object's start.
      Now that we insert into the remembered set directly from the write
      barrier this isn't an issue anymore: the write barrier knows the
      object start.
      
      Change-Id: I701465ea40b7c4ee20404ecbcf3750e5fa6fd219
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1876049Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64518}
      9c8f8fad
    • Leszek Swirski's avatar
      [heap] Introduce OffThreadSpace · fa13871a
      Leszek Swirski authored
      Add a new PagedSpace called OffThreadSpace. This space will be used for
      off-thread allocation -- it never marks or sweeps, and always expands
      into fresh pages. Once allocation completes, this space's pages can be
      merged into the old space.
      
      The space is similar to the CompactionSpace, and merging for both is
      identical, so we intrduce a new LocalSpace base class that both extend.
      They differ in interaction with the sweeper and in how new pages are
      acquired.
      
      This patch adds the new space and uses it in a few unittests. Future
      work will use it in the main source code.
      
      Bug: chromium:1011762
      Change-Id: Ia008cc95c6e1ef1d1e7ae305fa80fbfc1ff4be2d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1873690
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64509}
      fa13871a
  7. 22 Oct, 2019 1 commit
    • Dominik Inführ's avatar
      [heap] Slots are either in sweeping or old-to-new RS after Full GC · e79d34ee
      Dominik Inführ authored
      This CL ensures that recorded slots are either in the sweeping or the
      old-to-new remembered set after mark-compact depending on whether the
      page was already swept or not.
      
      All pages that are swept during the evacuation phase also have their
      remembered sets merged. is_local() is renamed to
      is_compaction_space() and non-virtual. The PagedSpace now not only
      knows whether it is a compaction space or not but also for which
      collection through the compaction_space_kind_ field. This allows
      RefillFreeList to merge the remembered sets immediately also for the
      mark-compact collection.
      
      Change-Id: I7457f8393d73f3e8d6b6ebedc46ebc36af509729
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1868613Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64458}
      e79d34ee
  8. 29 Aug, 2019 1 commit
    • Darius Mercadier's avatar
      [heap] Make FreeListCategory lighter (size-wise) · 604ef7bb
      Darius Mercadier authored
      A recent CL (1762292 and 1765533) changed the FreeList strategy,
      switching to one that uses 46 categories rather than the previous 6 we
      had. This caused a reduction of V8's heap size by about 1-2% on
      average. However, because FreeListCategory is 56 bytes, rather than 4
      bytes as one might expect (2 bytes offset, 1 byte for the category
      type, and 1 byte padding), the overall memory improvement is actually
      lower than that.
      
      For instance, when 256M memory is allocated,
          1000 pages * 46 freelists * 56 bytes = 2.5M overhead
      (ie, 1% overhead)
      
      Ideally, FreeListCategory should only by 4 bytes: 2 bytes for the
      offset of the top() on the page, 1 byte for the category type, and
      1 byte padding.
      
      
      This CL reduces the size of FreeListCategory by 24 bytes by removing
      some fields.
      
      More work should be done to reduce the size even further:
      
        - Remove the available_ counter (this require maintaining byte count
          at the page level rather than in each FreeListCategory; and
          maintaining that counter is not trivial, but doable).
      
        - Use a 16 bits offset to store the top() rather than a pointer.
      
        - Get rid of prev_ and next_: this change is the most
          complicated. It requires storing the space's pages in order, such
          that when one page's freelist is empty, we move on to the next
          page in the space.
      
        - the type_ field might even be removable, since this information can
          be deduced from the FreeListCategory's position in the page's array
          or FreeListCategory.
      
      Bug: v8:9329
      Change-Id: I8fd72cfa31ca12ba0dbf10be3948a72caee15b57
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1773270
      Commit-Queue: Darius Mercadier <dmercadier@google.com>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63448}
      604ef7bb
  9. 22 Aug, 2019 1 commit
    • Darius Mercadier's avatar
      [heap] Add new freelist: FreeListManyCachedOrigin · 18a2268f
      Darius Mercadier authored
      This new FreeList should be a reasonable replacement for our old
      FreeListLegacy: it is slightly less efficient (~1%), but uses much
      less memory (often 5% less old_space size).
      
      It is based on FreeListMany, with the following additions:
      
        - A cache to waste less time iterating empty categories
      
        - A fast path for allocations done in the runtime and generated code
      
        - A slow path (the same as FreeListMany actually) for allocations
          done in the GC.
      
      Bug: v8:9329
      Change-Id: Ifc10b88df7861266a721afd2c6e6d8357255ec4e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1762292
      Commit-Queue: Darius Mercadier <dmercadier@google.com>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63345}
      18a2268f
  10. 13 Aug, 2019 1 commit
    • Darius Mercadier's avatar
      [heap] Fix perf bug on PagedSpace::Available() · f4583702
      Darius Mercadier authored
      PagedSpace::Available() is mostly used for counters. One may expect
      that it'd be constant time or bearly noticeable performance-wise, but
      its cost is linear in the number of freelists and number of pages in
      the freelists. Overall, d8 --prof showed that it has a important
      runtime cost, and prevents freelists from scaling.
      
      This CL makes this counter constant-time, and should improve
      performances, even using with our current FreeList strategy
      (FreeListLegacy).
      
      Bug: v8:9329
      Bug: v8:9093
      Change-Id: I7682c5debc78498fe46e8dbce70b2fbd540b0fd0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1746473
      Commit-Queue: Darius Mercadier <dmercadier@google.com>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63197}
      f4583702
  11. 05 Aug, 2019 1 commit
  12. 29 Jul, 2019 1 commit
  13. 11 Jul, 2019 2 commits
  14. 17 Jun, 2019 1 commit
  15. 04 Jun, 2019 1 commit
  16. 23 May, 2019 1 commit
  17. 21 May, 2019 1 commit
  18. 08 May, 2019 1 commit
  19. 11 Apr, 2019 1 commit
  20. 04 Mar, 2019 1 commit
  21. 15 Feb, 2019 1 commit
  22. 14 Feb, 2019 1 commit
  23. 29 Jan, 2019 1 commit
  24. 22 Jan, 2019 1 commit
  25. 17 Jan, 2019 1 commit
    • Ulan Degenbaev's avatar
      Reland "[heap] Optimize MemoryChunk::FromAnyPointerAddress" · c0994d3f
      Ulan Degenbaev authored
      This is a reland of fd49c8bb
      
      Original change's description:
      > [heap] Optimize MemoryChunk::FromAnyPointerAddress
      > 
      > Currently this function requires the caller to hold a mutex for the
      > large page chunk hashtable and performs a hashtable lookup.
      > 
      > This patch adds a header sentinel field in each MemoryChunk. The field
      > is then used to distinguish large object slots from ordinary slots.
      > 
      > Bug: chromium:915233
      > Change-Id: I9fbeeb4f07f49573d0a21f9a2cc934370e417d68
      > Reviewed-on: https://chromium-review.googlesource.com/c/1391752
      > Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#58732}
      
      Bug: chromium:915233
      Change-Id: I10d23a928328169a2dc6bab78d2b7d2c5d00ebb6
      Reviewed-on: https://chromium-review.googlesource.com/c/1406672
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58876}
      c0994d3f
  26. 15 Jan, 2019 1 commit
  27. 11 Jan, 2019 2 commits
  28. 08 Jan, 2019 1 commit
  29. 26 Dec, 2018 1 commit
  30. 20 Dec, 2018 1 commit
  31. 08 Dec, 2018 1 commit
  32. 29 Nov, 2018 1 commit
  33. 27 Nov, 2018 1 commit
  34. 22 Nov, 2018 1 commit
  35. 15 Nov, 2018 1 commit