1. 14 Aug, 2017 1 commit
    • Ulan Degenbaev's avatar
      [heap] Refactor object marking state (part 2). · 19ae2fc1
      Ulan Degenbaev authored
      This follows up 4af9cfcc by separating incremental marking state
      from the full MC marking state. Runtime and tests now use only
      the incremental marking state. The full MC marking state used
      by MC during atomic pause.
      
      This separation decouples atomicity of markbit accesses
      during incremental marking and during full MC.
      
      Bug: chromium:694255
      TBR: mlippautz@chromium.org
      Change-Id: Ia409ab06515cd0d1403a272a016633295c0d6692
      Reviewed-on: https://chromium-review.googlesource.com/612350
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47336}
      19ae2fc1
  2. 11 Aug, 2017 1 commit
  3. 10 Aug, 2017 1 commit
    • Ulan Degenbaev's avatar
      [heap] Refactor object marking state. · 4af9cfcc
      Ulan Degenbaev authored
      This patch merges ObjectMarking and MarkingState. The new marking state
      encapsulates object marking, live byte tracking, and access atomicity.
      
      The old ObjectMarking calls are now replaced with calls to marking
      state. For example:
      ObjectMarking::WhiteToGrey<kAtomicity>(obj, marking_state(obj)
      becomes
      marking_state()->WhiteToGrey(obj)
      
      This simplifies custom handling of live bytes and allows to chose
      atomicity of markbit accesses depending on collector's state.
      
      This also decouples marking bitmap from the marking code, which will
      allows in future to use different data-structure for mark-bits.
      
      Bug: chromium:694255
      Change-Id: Ifb4bc0144187bac1c08f6bc74a9d5c618fe77740
      Reviewed-on: https://chromium-review.googlesource.com/602132
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47288}
      4af9cfcc
  4. 09 Aug, 2017 1 commit
  5. 03 Aug, 2017 3 commits
  6. 02 Aug, 2017 7 commits
  7. 01 Aug, 2017 4 commits
    • Ulan Degenbaev's avatar
      Revert "[heap] Add mechanism for tracking invalidated slots per memory chunk." · c59b81d7
      Ulan Degenbaev authored
      This reverts commit 7a5a777c.
      
      Reason for revert: crashing in test-api
      
      Original change's description:
      > [heap] Add mechanism for tracking invalidated slots per memory chunk.
      > 
      > For correct slots recording in concurrent marker, we need to resolve
      > the race that happens when
      > 1) the mutator is invalidating slots for double unboxing or string
      > conversions
      > 2) and the concurrent marker is recording these slots.
      > 
      > This patch adds a data-structure for tracking the invalidated objects.
      > Thus we can allow the concurrent marker to record slots without
      > worrying about clearing them. During old-to-old pointer updating phase
      > we re-check all slots that belong to the invalidated objects.
      > 
      > BUG=chromium:694255
      > 
      > Change-Id: Ifc3d82918cd3b96e5a5fb7125691626a56f4ab83
      > Reviewed-on: https://chromium-review.googlesource.com/591810
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47049}
      
      TBR=ulan@chromium.org,mlippautz@chromium.org
      
      Change-Id: I7f4f8e8cb027b921a82e9c0a0623536af02581fb
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:694255
      Reviewed-on: https://chromium-review.googlesource.com/595994Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47052}
      c59b81d7
    • Ulan Degenbaev's avatar
      [heap] Add mechanism for tracking invalidated slots per memory chunk. · 7a5a777c
      Ulan Degenbaev authored
      For correct slots recording in concurrent marker, we need to resolve
      the race that happens when
      1) the mutator is invalidating slots for double unboxing or string
      conversions
      2) and the concurrent marker is recording these slots.
      
      This patch adds a data-structure for tracking the invalidated objects.
      Thus we can allow the concurrent marker to record slots without
      worrying about clearing them. During old-to-old pointer updating phase
      we re-check all slots that belong to the invalidated objects.
      
      BUG=chromium:694255
      
      Change-Id: Ifc3d82918cd3b96e5a5fb7125691626a56f4ab83
      Reviewed-on: https://chromium-review.googlesource.com/591810Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47049}
      7a5a777c
    • Michael Lippautz's avatar
      [RCS] Reuse GCTracer scopes in RCS · 481c1705
      Michael Lippautz authored
      This makes all the information that is present for GCTracer also
      available to RCS.
      
      Bug: chromium:748569
      Change-Id: Ie7e8c3770b81ab1321cad08f6954492b72ef0514
      Reviewed-on: https://chromium-review.googlesource.com/585427
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47043}
      481c1705
    • Bill Budge's avatar
      Reland "[Memory] Add an OnCriticalMemoryPressure method to V8::Platform." · f8db3e8f
      Bill Budge authored
      This is a reland of 3f90d9f9
      Original change's description:
      > [Memory] Add an OnCriticalMemoryPressure method to V8::Platform.
      > 
      > Adds virtual V8::Platform::OnCriticalMemoryPressure method, default
      > implementation does nothing.
      > 
      > Calls this method on first allocation failures in NewArray, Malloced,
      > and zone AccountingAllocator and adds retry logic.
      > 
      > Adds utility functions for allocating base::VirtualMemory to functions
      > in allocation.h, which call this method and add retry logic.
      > 
      > Calls these utility functions in heap CodeRange, Spaces, StoreBuffer
      > and SequentialMarkingDeque.
      > 
      > Bug: v8:6635
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: I38afd394f3be556aca037d16675e9884658158cb
      > Reviewed-on: https://chromium-review.googlesource.com/583543
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46988}
      
      Bug: v8:6635
      Change-Id: I0d70c5796f407f0ed42cfddf581d26f533f9bea8
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/593090Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47027}
      f8db3e8f
  8. 29 Jul, 2017 2 commits
    • Georg Neis's avatar
      Revert "[Memory] Add an OnCriticalMemoryPressure method to V8::Platform." · 53db0584
      Georg Neis authored
      This reverts commit 3f90d9f9.
      
      Reason for revert: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/16510
      
      Original change's description:
      > [Memory] Add an OnCriticalMemoryPressure method to V8::Platform.
      > 
      > Adds virtual V8::Platform::OnCriticalMemoryPressure method, default
      > implementation does nothing.
      > 
      > Calls this method on first allocation failures in NewArray, Malloced,
      > and zone AccountingAllocator and adds retry logic.
      > 
      > Adds utility functions for allocating base::VirtualMemory to functions
      > in allocation.h, which call this method and add retry logic.
      > 
      > Calls these utility functions in heap CodeRange, Spaces, StoreBuffer
      > and SequentialMarkingDeque.
      > 
      > Bug: v8:6635
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: I38afd394f3be556aca037d16675e9884658158cb
      > Reviewed-on: https://chromium-review.googlesource.com/583543
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46988}
      
      TBR=bbudge@chromium.org,ulan@chromium.org,mlippautz@chromium.org
      
      Change-Id: I79afea5982e62db1462cc5a5585a226f0ddbe752
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6635
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/592887Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Georg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46989}
      53db0584
    • Bill Budge's avatar
      [Memory] Add an OnCriticalMemoryPressure method to V8::Platform. · 3f90d9f9
      Bill Budge authored
      Adds virtual V8::Platform::OnCriticalMemoryPressure method, default
      implementation does nothing.
      
      Calls this method on first allocation failures in NewArray, Malloced,
      and zone AccountingAllocator and adds retry logic.
      
      Adds utility functions for allocating base::VirtualMemory to functions
      in allocation.h, which call this method and add retry logic.
      
      Calls these utility functions in heap CodeRange, Spaces, StoreBuffer
      and SequentialMarkingDeque.
      
      Bug: v8:6635
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I38afd394f3be556aca037d16675e9884658158cb
      Reviewed-on: https://chromium-review.googlesource.com/583543
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46988}
      3f90d9f9
  9. 27 Jul, 2017 1 commit
  10. 25 Jul, 2017 1 commit
  11. 21 Jul, 2017 1 commit
  12. 17 Jul, 2017 1 commit
  13. 14 Jul, 2017 1 commit
    • Ulan Degenbaev's avatar
      [heap] Rework ASLR for base::Platform::VirtualMemory · 0640cbf3
      Ulan Degenbaev authored
      Currently every VirtualMemory allocation on 64-bit systems
      uses a random 46-bit address hint for ASLR.
      
      This leads to wired page leak on MacOS discovered by Erik Chen (see
      crbug.com/700928 and https://chromium-review.googlesource.com/c/557958/):
      "The Darwin kernel [as of macOS 10.12.5] does not clean up page directory
      entries [PDE] created from mmap or mach_vm_allocate, even after
      the region is destroyed. Using a virtual address space that is too large
      causes a leak of about 1 wired [can never be paged out] page per call to
      mmap(). The page is only reclaimed when the process is killed."
      
      This patch changes VirtualMemory to accept the hint parameter explicitly.
      
      On MacOS the hints are confined to 4GB contiguous region. Algorithm:
      - On startup, set heap.mmap_region_base_ to a random address.
      - For each mmap use heap.mmap_region_base_ + (random_offset % (4*GB)).
      
      BUG=chromium:700928
      
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I2ae6a024e02fbe63f940105d7920b57c19abacc6
      Reviewed-on: https://chromium-review.googlesource.com/558876
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46656}
      0640cbf3
  14. 13 Jul, 2017 2 commits
  15. 11 Jul, 2017 1 commit
  16. 06 Jul, 2017 1 commit
  17. 20 Jun, 2017 2 commits
  18. 19 Jun, 2017 1 commit
  19. 16 Jun, 2017 2 commits
  20. 14 Jun, 2017 1 commit
  21. 13 Jun, 2017 4 commits
  22. 12 Jun, 2017 1 commit