1. 13 Apr, 2016 1 commit
    • richard_chamberlain's avatar
      Improved diagnostic message for JS heap out of memory · 1ef7487b
      richard_chamberlain authored
      This patch replaces the unused 'take_snapshot' parameter on FatalProcessOutOfMemory()
      with a 'is_heap_oom' parameter. The parameter is set to true on error paths where the
      JS heap is out of memory, as distinct from a malloc() failure i.e. process out of memory.
      The message output to stderr or passed to embedding applications via FatalErrorCallback
      is 'Javascript heap out of memory' rather than 'process out of memory'.
      
      BUG=
      
      R=jochen@chromium.org, verwaest@chromium.org, michael_dawson@ca.ibm.com
      
      Review URL: https://codereview.chromium.org/1873443002
      
      Cr-Commit-Position: refs/heads/master@{#35431}
      1ef7487b
  2. 12 Apr, 2016 2 commits
    • hlopko's avatar
      Use EmbedderHeapTracer instead of object grouping when embedder sets the heap tracer. · 6d1f7282
      hlopko authored
      When the embedder sets the heap tracer, V8, during marking, will collect all reachable wrappers, and then ask embedder to trace its heap. The embedder is expected to call PersistentBase::RegisterExternalReference with all wrappers reachable from the given ones. This fixed point iteration happens in MarkCompact::ProcessEphemeralMarking.
      
      For more efficient object visiting during marking, we need a special JS_API_OBJECT_TYPE (in tandem with already existing JS_SPECIAL_API_OBJECT_TYPE) and corresponding visitor (JSApiObjectVisitor).
      
      BUG=chromium:468240
      LOG=no
      
      Review URL: https://codereview.chromium.org/1844413002
      
      Cr-Commit-Position: refs/heads/master@{#35412}
      6d1f7282
    • jochen's avatar
      [api] Introduce ReturnValue::Get · b3d793e4
      jochen authored
      This is a convenience API that an embedder can use to do final checks on
      the return value. Note that this creates a new handle and thus defeats
      the performance optimization done for ReturnValue - an embedder should
      only use this in non-performance critical code paths.
      
      BUG=
      R=verwaest@chromium.org
      
      Review URL: https://codereview.chromium.org/1875263003
      
      Cr-Commit-Position: refs/heads/master@{#35409}
      b3d793e4
  3. 11 Apr, 2016 3 commits
  4. 06 Apr, 2016 3 commits
  5. 05 Apr, 2016 2 commits
  6. 04 Apr, 2016 2 commits
  7. 31 Mar, 2016 4 commits
  8. 24 Mar, 2016 1 commit
  9. 22 Mar, 2016 1 commit
  10. 17 Mar, 2016 1 commit
    • yangguo's avatar
      [serializer] ensure that immortal immovable roots are correctly deserialized. · 6e8958ff
      yangguo authored
      Immortal immovable roots must be allocated on the first page of the space.
      If serializing the root list exceeds the first page, immortal immovable root
      objects might end up outside of the first page. That could cause missing
      write barriers.
      
      We now iterate the root list twice. The first time we only serialize immortal
      immovable root objects. The second time we serialize the rest.
      
      R=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1811913002
      
      Cr-Commit-Position: refs/heads/master@{#34859}
      6e8958ff
  11. 16 Mar, 2016 1 commit
    • mstarzinger's avatar
      Introduce "optimized_out" oddball marker for compilers. · eee34dd5
      mstarzinger authored
      This introduces {optimized_out} as another Oddball kind to be used by
      optimizing compilers when values are being optimized away. The aim is
      providing visibility when this value leaks into the application domain.
      Currently this will lead to {undefined} values appearing which then
      silently propagate through the application. The special oddball can be
      identified easily as a bug and also the debugger can treat it specially
      when needed.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1810483002
      
      Cr-Commit-Position: refs/heads/master@{#34817}
      eee34dd5
  12. 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
  13. 11 Mar, 2016 1 commit
  14. 07 Mar, 2016 1 commit
  15. 29 Feb, 2016 1 commit
    • bmeurer's avatar
      [stubs] Introduce a proper ToBooleanStub. · d1df58e8
      bmeurer authored
      Rename the existing (patching) ToBooleanStub to ToBooleanICStub to match
      our naming convention, and add a new TurboFan-powered ToBooleanStub,
      which just does the ToBoolean conversion without any runtime call or
      code patching, so we can use it for Ignition (and TurboFan).
      
      Drive-by-fix: Add an Oddball::to_boolean field similar to the ones we
      already have for to_string and to_number, so we don't need to actually
      dispatch on the concrete Oddball at all.
      
      R=epertoso@chromium.org, rmcilroy@chromium.org, yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1744163002
      
      Cr-Commit-Position: refs/heads/master@{#34361}
      d1df58e8
  16. 25 Feb, 2016 1 commit
  17. 22 Feb, 2016 3 commits
    • littledan's avatar
      Optimize @@species based on a global 'protector' cell · 7033ae51
      littledan authored
      This patch makes ArraySpeciesCreate fast in V8 by avoiding two property reads
      when the following conditions are met:
      - No Array instance has had its __proto__ reset
      - No Array instance has had a constructor property defined
      - Array.prototype has not had its constructor changed
      - Array[Symbol.species] has not been reset
      
      For subclasses of Array, or for conditions where one of these assumptions is
      violated, the full lookup of species is done according to the ArraySpeciesCreate
      algorithm. Although this is a "performance cliff", it does not come up in the
      expected typical use case of @@species (Array subclassing), so it is hoped that
      this can form a good start. Array subclasses will incur the slowness of looking
      up @@species, but their use won't slow down invocations of, for example,
      Array.prototype.slice on Array base class instances.
      
      Possible future optimizations:
      - For the fallback case where the assumptions don't hold, optimize the two
        property lookups.
      - For Array.prototype.slice and Array.prototype.splice, even if the full lookup
        of @@species needs to take place, we still could take the rest of the C++
        fastpath. However, to do this correctly requires changing the calling convention
        from C++ to JS to pass the @@species out, so it is not attempted in this patch.
      
      With this patch, microbenchmarks of Array.prototype.slice do not suffer a
      noticeable performance regression, unlike their previous 2.5x penalty.
      
      TBR=hpayer@chromium.org
      
      Review URL: https://codereview.chromium.org/1689733002
      
      Cr-Commit-Position: refs/heads/master@{#34199}
      7033ae51
    • yangguo's avatar
      [interpreter, debugger] support debug breaks via bytecode array copy · e032a98d
      yangguo authored
      R=mstarzinger@chromium.org, rmcilroy@chromium.org
      BUG=v8:4690
      LOG=N
      
      Review URL: https://codereview.chromium.org/1703453002
      
      Cr-Commit-Position: refs/heads/master@{#34190}
      e032a98d
    • ulan's avatar
      Activate memory reducer for small heaps in background tabs. · b238864d
      ulan authored
      BUG=chromium:587574
      LOG=NO
      
      Review URL: https://codereview.chromium.org/1705183003
      
      Cr-Commit-Position: refs/heads/master@{#34188}
      b238864d
  18. 18 Feb, 2016 1 commit
  19. 17 Feb, 2016 2 commits
  20. 16 Feb, 2016 2 commits
    • 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
    • cbruni's avatar
      [left-trimming] Avoid creating duplicate handles in builtins.cc · 6dd16e8e
      cbruni authored
      EnsureJSArrayWithWritableFastElements
      
      Having several handles pointing to the backing store of an array that gets
      left-trimmed might cause the gc to start marking a stale-handle still pointing
      to the old backing-store start. By introducing a separate handle scope for
      EnsureJSArrayWithWritableFastElements we avoid this issue. Additionally a
      SLOW_DCHECK in Heap::LeftTrimFixedArray ensurse that there are no more than one
      active handle pointing to the backing store.
      
      BUG=chr:585787
      LOG=n
      
      Review URL: https://codereview.chromium.org/1699733003
      
      Cr-Commit-Position: refs/heads/master@{#34022}
      6dd16e8e
  21. 12 Feb, 2016 2 commits
    • mattloring's avatar
      Allocation sampling for paged/large object spaces · f3cdf8a9
      mattloring authored
      This change expands allocation sampling to include old, map, code, and large object spaces. This involved refactoring much of the observation logic out of NewSpace into Space and overriding as needed in sub-classes.
      
      Additionally, the sampling heap profiler now maintains a pair of heap observers. One observer is used for observing new space and resetting the inline allocation limit to be periodically notified of allocations. The other observes allocation across the other spaces where there is no additional work required to observe allocations.
      
      Tests have been updated to ensure that allocations are observed correctly for Paged and LargeObject spaces.
      
      R=ofrobots@google.com, hpayer@chromium.org, ulan@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1625753002
      
      Cr-Commit-Position: refs/heads/master@{#33959}
      f3cdf8a9
    • bmeurer's avatar
      [runtime] Introduce FastNewStrictArgumentsStub to optimize strict arguments. · 09d84535
      bmeurer authored
      The FastNewStrictArgumentsStub is very similar to the recently added
      FastNewRestParameterStub, it's actually almost a copy of it, except that
      it doesn't have the fast case we have for the empty rest parameter. This
      patch improves strict arguments in TurboFan and fullcodegen by up to 10x
      compared to the previous version.
      
      Also introduce proper JSSloppyArgumentsObject and JSStrictArgumentsObject
      for the in-object properties instead of having them as constants in the
      Heap class.
      
      Drive-by-fix: Use this stub and the FastNewRestParameterStub in the
      interpreter to avoid the runtime call overhead for strict arguments
      and rest parameter creation.
      
      R=jarin@chromium.org
      TBR=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1693513002
      
      Cr-Commit-Position: refs/heads/master@{#33925}
      09d84535
  22. 11 Feb, 2016 1 commit
  23. 10 Feb, 2016 1 commit
    • mlippautz's avatar
      [heap] Move to page lookups for SemiSpace, NewSpace, and Heap containment methods · cfbd2561
      mlippautz authored
      Preparing the young generation for (real) non-contiguous backing memory, this
      change removes object masks that are used to compute containment in semi and new
      space. The masks are replaced by lookups for object tags and page headers, where
      possible.
      
      Details:
      - Use the fast checks (page header lookups) for containment in regular code.
      - Use the slow version that masks out the page start adress and iterates all
        pages of a space for debugging/verification.
      - The slow version works for off-heap/unmapped memory.
      - Encapsulate all checks for the old->new barrier in Heap::RecordWrite().
      
      BUG=chromium:581412
      LOG=N
      
      Review URL: https://codereview.chromium.org/1632913003
      
      Cr-Commit-Position: refs/heads/master@{#33857}
      cfbd2561
  24. 09 Feb, 2016 1 commit
  25. 08 Feb, 2016 1 commit
    • ulan's avatar
      New page local store buffer. · bb883395
      ulan authored
      This replaces the global remembered set with per-page remembered sets.
      
      Each page in the old space, map space, and large object space keeps track of
      the set of slots in the page pointing to the new space.
      
      The data structure for storing slot sets is a two-level bitmap, which allows
      us to remove the store buffer overflow and SCAN_ON_SCAVENGE logic.
      
      Design doc: https://goo.gl/sMKCf7
      
      BUG=chromium:578883
      LOG=NO
      
      Review URL: https://codereview.chromium.org/1608583002
      
      Cr-Commit-Position: refs/heads/master@{#33806}
      bb883395