1. 17 Aug, 2016 1 commit
    • mlippautz's avatar
      [heap] Filter slots in map space · 23f61424
      mlippautz authored
      We mark an object allocated as uninitialized. If we happen to have a GC before
      fields of a map are written, msan will observe access to unitialized memory and
      crash.
      
      This also unifies the handling as we now deal with all spaces in the same way.
      In future we could parallelize clearing.
      
      BUG=chromium:638226
      R=hpayer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2251993002
      Cr-Commit-Position: refs/heads/master@{#38681}
      23f61424
  2. 12 Jul, 2016 1 commit
  3. 05 Jul, 2016 1 commit
  4. 28 Jun, 2016 1 commit
    • ahaas's avatar
      Reland [heap] Avoid the use of cells to point from code to new-space objects. · 5e058540
      ahaas authored
      The reason for reverting is: This breaks gc-stress bot:
      https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot
      
      Abortion of compaction could cause duplicate entries in the typed-old-to-new remembered set. These duplicates could cause a DCHECK to trigger which checks that slots recorded in the remembered set never point to to-space. This reland-CL allows duplicates in the remembered set by removing the DCHECK, and additionally clears entries in the remembered set if objects are moved.
      
      Original issue's description:
      
      Cells were needed originally because there was no typed remembered set to
      record direct pointers from code space to new space. A previous
      CL (https://codereview.chromium.org/2003553002/) already introduced
      the remembered set, this CL uses it.
      
      This CL
      * stores direct pointers in code objects, even if the target is in new space,
      * records the slot of the pointer in typed-old-to-new remembered set,
      * adds a list which stores weak code-to-new-space references,
      * adds a test to test-heap.cc for weak code-to-new-space references,
      * removes prints in tail-call-megatest.js
      
      Review-Url: https://codereview.chromium.org/2097023002
      Cr-Commit-Position: refs/heads/master@{#37325}
      5e058540
  5. 23 Jun, 2016 3 commits
    • vogelheim's avatar
      Revert of Reland [heap] Avoid the use of cells to point from code to new-space... · 25d59e9d
      vogelheim authored
      Revert of Reland [heap] Avoid the use of cells to point from code to new-space objects. (patchset #3 id:40001 of https://codereview.chromium.org/2091733002/ )
      
      Reason for revert:
      This breaks gc-stress bot: https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot
      
      #
      # Fatal error in ../../src/heap/mark-compact.cc, line 3715
      # Check failed: Page::FromAddress(reinterpret_cast<HeapObject*>(*slot)->address()) ->IsFlagSet(Page::PAGE_NEW_NEW_PROMOTION).
      #
      
      I can reproduce locally, and local revert also fixes it -> revert.
      
      Reproduce with:
       out/Debug/d8 --test --random-seed=2140216864 --nohard-abort --nodead-code-elimination --nofold-constants --enable-slow-asserts --debug-code --verify-heap --allow-natives-syntax --harmony-tailcalls test/mjsunit/mjsunit.js  test/mjsunit/es6/tail-call-megatest-shard2.js --gc-interval=500 --stress-compaction --concurrent-recompilation-queue-length=64 --concurrent-recompilation-delay=500 --concurrent-recompilation
      
      (Maybe run in loop; it's flaky when broken; but passes reliably w/ revert.)
      
      Original issue's description:
      > Reland [heap] Avoid the use of cells to point from code to new-space objects.
      >
      > The reason for reverting was: [Sheriff] Breaks arm debug:
      > https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm%20-%20sim%20-%20debug/builds/1038.
      >
      > The problem was the dereferencing of handles for smi checks. It turned out
      > that these smi checks can be removed anyways, both on arm and on mips.
      >
      > Additionally some rebasing was necessary.
      >
      > Original issue's description:
      >
      > Cells were needed originally because there was no typed remembered set to
      > record direct pointers from code space to new space. A previous
      > CL (https://codereview.chromium.org/2003553002/) already introduced
      > the remembered set, this CL uses it.
      >
      > This CL
      > * stores direct pointers in code objects, even if the target is in new space,
      > * records the slot of the pointer in typed-old-to-new remembered set,
      > * adds a list which stores weak code-to-new-space references,
      > * adds a test to test-heap.cc for weak code-to-new-space references,
      > * removes prints in tail-call-megatest.js
      >
      > R=mlippautz@chromium.org
      >
      > Committed: https://crrev.com/5508e16592522658587da71ba6743c8e832fe4d1
      > Cr-Commit-Position: refs/heads/master@{#37217}
      
      TBR=mlippautz@chromium.org,ahaas@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review-Url: https://codereview.chromium.org/2090983002
      Cr-Commit-Position: refs/heads/master@{#37221}
      25d59e9d
    • ahaas's avatar
      Reland [heap] Avoid the use of cells to point from code to new-space objects. · 5508e165
      ahaas authored
      The reason for reverting was: [Sheriff] Breaks arm debug:
      https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm%20-%20sim%20-%20debug/builds/1038.
      
      The problem was the dereferencing of handles for smi checks. It turned out
      that these smi checks can be removed anyways, both on arm and on mips.
      
      Additionally some rebasing was necessary.
      
      Original issue's description:
      
      Cells were needed originally because there was no typed remembered set to
      record direct pointers from code space to new space. A previous
      CL (https://codereview.chromium.org/2003553002/) already introduced
      the remembered set, this CL uses it.
      
      This CL
      * stores direct pointers in code objects, even if the target is in new space,
      * records the slot of the pointer in typed-old-to-new remembered set,
      * adds a list which stores weak code-to-new-space references,
      * adds a test to test-heap.cc for weak code-to-new-space references,
      * removes prints in tail-call-megatest.js
      
      R=mlippautz@chromium.org
      
      Review-Url: https://codereview.chromium.org/2091733002
      Cr-Commit-Position: refs/heads/master@{#37217}
      5508e165
    • mlippautz's avatar
      [heap] Modernize all *Page iterators to be proper C++ iterators · 4244b989
      mlippautz authored
      As part of the page type unification also unify page iterators. Iterating
      over a space works the same for all spaces now (new, old, lo).
      
      Iterating over pages of a space follows now the regular C++ iterator pattern:
      - for (auto it = space->begin(); it != space->end(); ++it) {}
      - for (Page* p : *space) {}
      
      GC only: Loop supporting unlinking/freeing of a Page on the fly:
        for (auto it = space->begin(); != space->end();) {
          Page* p = *(it++);
          p->Unlink();
        }
      
      For iteration of a range of new space pages use NewSpacePageRange which
      also verifies that the range is actually a proper new space page range.
      
      BUG=chromium:581412
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2088223002
      Cr-Commit-Position: refs/heads/master@{#37210}
      4244b989
  6. 21 Jun, 2016 2 commits
  7. 18 Mar, 2016 1 commit
  8. 14 Mar, 2016 1 commit
    • hpayer's avatar
      [heap] Black allocation. · ad51e8b1
      hpayer authored
      When black allocation is active, all objects allocated in old space are allocated black. Important: With that change, you cannot assume anymore that new objects are white right after their allocation. Currently, black allocation is enabled when incremental marking is started.
      
      This feature can be turned off via flag: --noblack-allocation
      
      BUG=chromium:561449
      LOG=n
      
      Review URL: https://codereview.chromium.org/1420423009
      
      Cr-Commit-Position: refs/heads/master@{#34743}
      ad51e8b1
  9. 25 Feb, 2016 1 commit
  10. 24 Feb, 2016 1 commit
    • ulan's avatar
      Revert of Replace slots buffer with remembered set. (patchset #14 id:250001 of... · 9146bc5e
      ulan authored
      Revert of Replace slots buffer with remembered set. (patchset #14 id:250001 of https://codereview.chromium.org/1703823002/ )
      
      Reason for revert:
      Revert because of canary crashes: crbug.com/589413
      
      Original issue's description:
      > Replace slots buffer with remembered set.
      >
      > Slots pointing to evacuation candidates are now recorded in the new RememberedSet<OLD_TO_OLD>.
      >
      > The remembered set is extended to support typed slots.
      >
      > During parallel evacuation all migration slots are recorded in local slots buffers.
      > After evacuation all local slots are added to the remembered set.
      >
      > BUG=chromium:578883
      > LOG=NO
      >
      > Committed: https://crrev.com/2285a99ef6f7d52f4f0c4d88a7db4224443ee152
      > Cr-Commit-Position: refs/heads/master@{#34212}
      
      TBR=jochen@chromium.org,hpayer@chromium.org,mlippautz@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=chromium:578883
      
      Review URL: https://codereview.chromium.org/1725073003
      
      Cr-Commit-Position: refs/heads/master@{#34238}
      9146bc5e
  11. 23 Feb, 2016 1 commit
    • ulan's avatar
      Replace slots buffer with remembered set. · 2285a99e
      ulan authored
      Slots pointing to evacuation candidates are now recorded in the new RememberedSet<OLD_TO_OLD>.
      
      The remembered set is extended to support typed slots.
      
      During parallel evacuation all migration slots are recorded in local slots buffers.
      After evacuation all local slots are added to the remembered set.
      
      BUG=chromium:578883
      LOG=NO
      
      Review URL: https://codereview.chromium.org/1703823002
      
      Cr-Commit-Position: refs/heads/master@{#34212}
      2285a99e
  12. 16 Feb, 2016 1 commit
    • ulan's avatar
      Add a generic remembered set class. · 4fdc19ae
      ulan authored
      This new class provides a unified interface for recording and iterating slots in store and slots buffers:
      
      RememberedSet<OLD_TO_NEW>::Insert(page, slot);
      RememberedSet<OLD_TO_OLD>::Insert(page, slot);
      
      RememberedSet<OLD_TO_NEW>::Iterate(heap, callback);
      RememberedSet<OLD_TO_OLD>::Iterate(heap, callback);
      
      After this change the store buffer is responsible only for collecting slots from the generated code.
      
      Subsequent CLs will remove the slots buffer.
      
      BUG=chromium:578883
      LOG=NO
      
      Review URL: https://codereview.chromium.org/1683653002
      
      Cr-Commit-Position: refs/heads/master@{#34031}
      4fdc19ae