1. 15 Nov, 2021 1 commit
  2. 09 Nov, 2021 1 commit
  3. 28 Sep, 2021 1 commit
  4. 13 Sep, 2021 1 commit
  5. 09 Sep, 2021 1 commit
  6. 16 Aug, 2021 1 commit
  7. 09 Aug, 2021 1 commit
  8. 06 Jul, 2021 1 commit
  9. 01 Jul, 2021 1 commit
  10. 30 Jun, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] Concurrent JSGlobalObjectRef::GetPropertyCell · 76b9d98f
      Jakob Gruber authored
      .. and make JSGlobalObjectRef bg-serialized.
      
      GetPropertyCell was implemented as:
      
       LookupIterator it(holder, isolate, name, LookupIterator::OWN);
       it.TryLookupCachedProperty();
       if (it.state() == LookupIterator::DATA) it.GetPropertyCell();
      
      Due to concurrency requirements, we essentially have to reimplement
      this entire path for use in a concurrent setting:
      
       - Reads in some cases have to use relaxed or acquire semantics.
       - The IsPendingAllocation predicate must be called on some objects
         before reading into them.
       - Repeated reads of the same field must be avoided due to the
         possibility of concurrent modifications.
      
      This CL introduces two new methods:
      
      ConcurrentLookupIterator::TryGetPropertyCell implements the outer
      lookup logic, including the repeated lookup for accessors / cached
      property names.
      
      GlobalDictionary::TryFindPropertyCellForConcurrentLookupIterator is a
      slightly modified HashTable::FindEntry which follows the above rules.
      
      Bug: v8:7790
      Change-Id: Ic9a52da766afdfedce8efcbda92876845a17eed9
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959616Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75467}
      76b9d98f
  11. 25 Jun, 2021 1 commit
  12. 23 Jun, 2021 1 commit
  13. 11 Jun, 2021 1 commit
  14. 07 Jun, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] Remove use of serialized JSObjectRef::elements · 8769666e
      Jakob Gruber authored
      .. and replace them by elements read directly from the heap object.
      
      With this change, consistency between `map` and `elements` is
      no longer guaranteed. Users were updated, when necessary, to deal
      with this, e.g. by being more careful not to read out of bounds,
      by inserting new `actual_elements == elements_constant` runtime
      checks, or through a new compilation dependency that verifies
      unchanged elements at finalization time.
      
      Drive-by: inline GetElementsKind into callsites.
      
      Bug: v8:7790
      Change-Id: Ifba78182e185ff0d4e954e3be52f0eb24328c853
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2909655Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74977}
      8769666e
  15. 26 May, 2021 2 commits
  16. 17 May, 2021 1 commit
  17. 22 Apr, 2021 2 commits
    • Jakob Gruber's avatar
      [compiler] Support GetPropertyAccessInfo in a concurrent setting · 1277bb5c
      Jakob Gruber authored
      Until this CL, the JSHeapBroker::GetPropertyAccessInfo (GPAI) process
      was as follows:
      
       1. GPAI is called on the main thread (MT) during the serialization
          phase to create and cache PAIs.
       2. GPAI is called again from the background thread (BT); only cached
          PAIs from step 1 are usable.
      
      As part of concurrent inlining, the goal is to move GPAI fully to the
      background thread. This CL takes a major step in that direction by
      making GPAI itself callable from the BT without resorting solely to PAIs
      that were previously cached on the MT.
      
      There are two main reasons why GPAI previously had to run on the MT:
      
       a) Concurrent access to Maps and other heap objects.
       b) Serialization and creation of ObjectRefs for objects discovered
          during GPAI.
      
      This CL addresses only reason a) and leaves b) for future work. This
      is done by keeping the two-pass approach, s.t. the initial call of
      GPAI on the MT discovers and serializes objects. We then clear all
      cached PAIs. The second call of GPAI on the BT thus runs full logic in a
      concurrent setting.
      
      Once all relevant objects (= maps and prototypes) no longer require
      MT-serialization, reason b) is also addressed and the first pass can be
      removed.
      
      The new logic is implemented behind the runtime flag
      --turbo-concurrent-get-property-access-info (default true), intended
      to be removed in the future.
      
      Bug: v8:7790
      Change-Id: Idbdbfe091d7316529246a686bb6d71c2a0f06f8b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2817793
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Auto-Submit: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74120}
      1277bb5c
    • Junliang Yan's avatar
      [runtime] fix gcc complain on Werror=parentheses · 784c5702
      Junliang Yan authored
      Bug: v8:11675
      Change-Id: I8046e61d92b502a8c96f11e3ecfc528544c6ba97
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843953
      Commit-Queue: Georg Neis <neis@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74114}
      784c5702
  18. 21 Apr, 2021 1 commit
  19. 16 Apr, 2021 1 commit
  20. 12 Apr, 2021 1 commit
  21. 08 Apr, 2021 1 commit
  22. 29 Mar, 2021 1 commit
  23. 16 Mar, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] Concurrent JSObjectRef::GetOwnConstantElement · 21a23587
      Jakob Gruber authored
      This CL implements the above in a concurrent setting without relying
      on serialization (except existing serialization to read a consistent
      JSObject state, which should be addressed in future work).
      
      There are three main cases in which GetOwnConstantElement can succeed:
      
      - Frozen elements are always constant. The backing store is immutable
      after initialization and can be accessed through relaxed reads.
      - String wrapper elements are always constant. The JSPrimitiveWrapper
      is immutable after initialization, and internalized Strings are
      protected by a mutex (other string kinds are currently not handled).
      - Dictionary elements may be constant. Since this case is not
      particularly important for the optimization, we leave it unimplemented
      for now.
      
      Bug: v8:7790
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_no_cm_rel_ng
      Change-Id: If2fbced50218ebd3930da8157cd2ae5eb83a8e02
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2717308Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73442}
      21a23587
  24. 08 Mar, 2021 2 commits
  25. 05 Mar, 2021 1 commit
    • Frank Emrich's avatar
      [dict-proto] SwissNameDictionary rollout in runtime code, pt. 2 · 1b67ab4d
      Frank Emrich authored
      This CL is part of a series that makes SwissNameDictionary available
      as a new property backing store. Currently, the flag
      v8_dict_mode_prototypes allows selecting between NameDictionary and
      OrderedNameDictionary as the backing store used for all dictionary
      mode objects. This series of CLs changes this such that enabling the
      flag causes SwissNameDictionary being used instead of
      OrderedNameDictionary. The behavior for when the flag is not set
      remains unchanged (= use NameDictionary).
      
      This particular CL just collects many small changes.
      
      Note that the changes this CL makes to literal-objects.cc do not
      fix the problems with the enumeration order of computed property
      names in classes that currently exist when using OrderedNameDictionary.
      This will be fixed separately.
      
      Bug: v8:11388
      Change-Id: I6b98f61c395b4f2788407d6a34363ef8863cce9a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735834
      Commit-Queue: Frank Emrich <emrich@google.com>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73224}
      1b67ab4d
  26. 24 Feb, 2021 1 commit
  27. 22 Feb, 2021 1 commit
    • Jakob Gruber's avatar
      Reland "[compiler] Direct heap reads for JSArrayRef" · 2e844377
      Jakob Gruber authored
      This is a reland of 76a2ab06
      
      Changes since the original CL:
      - Handle unserialized elements (optional result in getter).
      - Merge should_access_heap and --turbo-direct-heap-access paths.
      - Slightly update the serialized path in GetOwnCowElement.
      - Fix the cctest, add a regression test.
      
      Atomic JSObject::elements/JSArray::length setters are addressed
      in this CL: crrev.com/c/2704076.
      
      Original change's description:
      > [compiler] Direct heap reads for JSArrayRef
      >
      > There are two aspects to the non-JSObject parts of JSArrayRef:
      >
      > - JSArrayRef::length. Relevant only in two spots, 1. when reading
      > (immutable) array boilerplates and 2. for GetOwnCowElement.
      >
      > - JSArrayRef::GetOwnCowElement. May read into a copy-on-write backing
      > store. Relies on the invariant that cow backing stores are immutable.
      >
      > This CL renames the length accessor to length_unsafe to make the
      > danger explicit at callsites.
      >
      > For GetOwnCowElement the refactor is slightly larger, since we now
      > need to read into the backing store while keeping full control of
      > object reads (e.g. JSArray::length and JSArray::elements_kind). We
      > make all reads explicit at the call site by requiring that elements,
      > elements kind, and length are passed in as arguments to
      > GetOwnCowElement. Inside GetOwnCowElement, consistency between these
      > is *not* guaranteed due to concurrency. At runtime, consistency *is*
      > guaranteed through the reference-equality check on the elements seen
      > during compilation. The actual elements read is implemented in
      > ConcurrentLookupIterator::GetOwnCowElement.
      >
      > Bug: v8:7790
      > Change-Id: I9aa169ce4f2b1e2bfe1e9232007669eb7654a995
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2695403
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72834}
      
      Bug: v8:7790
      Change-Id: I7577ad554992cafff81099a28c34f27db9bd8042
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2710431
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72904}
      2e844377
  28. 19 Feb, 2021 1 commit
    • Georg Neis's avatar
      Revert "[compiler] Direct heap reads for JSArrayRef" · 3cfe4fe0
      Georg Neis authored
      This reverts commit 76a2ab06.
      
      Reason for revert: A few issues, e.g.
      https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8854931126653780144/+/u/Check__flakes_/ArrayWithCowElements
      
      Original change's description:
      > [compiler] Direct heap reads for JSArrayRef
      >
      > There are two aspects to the non-JSObject parts of JSArrayRef:
      >
      > - JSArrayRef::length. Relevant only in two spots, 1. when reading
      > (immutable) array boilerplates and 2. for GetOwnCowElement.
      >
      > - JSArrayRef::GetOwnCowElement. May read into a copy-on-write backing
      > store. Relies on the invariant that cow backing stores are immutable.
      >
      > This CL renames the length accessor to length_unsafe to make the
      > danger explicit at callsites.
      >
      > For GetOwnCowElement the refactor is slightly larger, since we now
      > need to read into the backing store while keeping full control of
      > object reads (e.g. JSArray::length and JSArray::elements_kind). We
      > make all reads explicit at the call site by requiring that elements,
      > elements kind, and length are passed in as arguments to
      > GetOwnCowElement. Inside GetOwnCowElement, consistency between these
      > is *not* guaranteed due to concurrency. At runtime, consistency *is*
      > guaranteed through the reference-equality check on the elements seen
      > during compilation. The actual elements read is implemented in
      > ConcurrentLookupIterator::GetOwnCowElement.
      >
      > Bug: v8:7790
      > Change-Id: I9aa169ce4f2b1e2bfe1e9232007669eb7654a995
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2695403
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72834}
      
      Bug: v8:7790, chromium:1180012
      Change-Id: I50e72380c544b2b78e1e3dc87a8249281b710912
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704666
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Georg Neis <neis@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72860}
      3cfe4fe0
  29. 18 Feb, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] Direct heap reads for JSArrayRef · 76a2ab06
      Jakob Gruber authored
      There are two aspects to the non-JSObject parts of JSArrayRef:
      
      - JSArrayRef::length. Relevant only in two spots, 1. when reading
      (immutable) array boilerplates and 2. for GetOwnCowElement.
      
      - JSArrayRef::GetOwnCowElement. May read into a copy-on-write backing
      store. Relies on the invariant that cow backing stores are immutable.
      
      This CL renames the length accessor to length_unsafe to make the
      danger explicit at callsites.
      
      For GetOwnCowElement the refactor is slightly larger, since we now
      need to read into the backing store while keeping full control of
      object reads (e.g. JSArray::length and JSArray::elements_kind). We
      make all reads explicit at the call site by requiring that elements,
      elements kind, and length are passed in as arguments to
      GetOwnCowElement. Inside GetOwnCowElement, consistency between these
      is *not* guaranteed due to concurrency. At runtime, consistency *is*
      guaranteed through the reference-equality check on the elements seen
      during compilation. The actual elements read is implemented in
      ConcurrentLookupIterator::GetOwnCowElement.
      
      Bug: v8:7790
      Change-Id: I9aa169ce4f2b1e2bfe1e9232007669eb7654a995
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2695403
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72834}
      76a2ab06
  30. 12 Feb, 2021 1 commit
    • Georg Neis's avatar
      Reland "[compiler] Directly read PropertyCells" · cf7cba8d
      Georg Neis authored
      This reverts commit 87df0b7e (thus
      relands 42cd9eb7), with fixes for
      the discovered issues.
      
      Original change's description:
      > Revert "[compiler] Directly read PropertyCells"
      >
      > This reverts commit 42cd9eb7.
      >
      > Reason for revert: Clusterfuzz issues, e.g.
      > https://bugs.chromium.org/p/chromium/issues/detail?id=1176318
      >
      > Original change's description:
      > > [compiler] Directly read PropertyCells
      > >
      > > Main changes:
      > >
      > > - Introduce a new broker data kind kBackgroundSerialized for objects
      > >   that can be serialized in the background (when direct reads are on).
      > >   (I'm planning to remove kPossiblyBackgroundSerialized in a followup,
      > >   in favor of a dynamic choice of kSerialized or kBackgroundSerialized).
      > > - Make PropertyCell use that new kind.
      > > - Introduce a bottleneck in runtime code for changes to PropertyCells
      > >   and make sure that a certain protocol is followed that allows
      > >   concurrent reads from the background thread.
      > > - Improve interface of PropertyCell in various ways.
      > >
      > > Bug: v8:7790
      > > Change-Id: If3d7926c3b894808811348b4b2bed153f5c06897
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2661462
      > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > > Commit-Queue: Georg Neis <neis@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#72586}
      >
      > TBR=ulan@chromium.org,neis@chromium.org,verwaest@chromium.org,nicohartmann@chromium.org
      >
      > Change-Id: Id04145760c49fa379bc5a3fc16eba664025a9180
      > Bug: v8:7790
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2685125
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Commit-Queue: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72619}
      
      Bug: v8:7790, chromium:1176509, chromium:1176318, chromium:1176504
      Change-Id: Icaf285912bb948432a4a2d599cd174f6a5aa296e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2685166Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Georg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72697}
      cf7cba8d
  31. 11 Feb, 2021 2 commits
  32. 10 Feb, 2021 1 commit
    • Georg Neis's avatar
      Revert "[compiler] Directly read PropertyCells" · 87df0b7e
      Georg Neis authored
      This reverts commit 42cd9eb7.
      
      Reason for revert: Clusterfuzz issues, e.g.
      https://bugs.chromium.org/p/chromium/issues/detail?id=1176318
      
      Original change's description:
      > [compiler] Directly read PropertyCells
      >
      > Main changes:
      >
      > - Introduce a new broker data kind kBackgroundSerialized for objects
      >   that can be serialized in the background (when direct reads are on).
      >   (I'm planning to remove kPossiblyBackgroundSerialized in a followup,
      >   in favor of a dynamic choice of kSerialized or kBackgroundSerialized).
      > - Make PropertyCell use that new kind.
      > - Introduce a bottleneck in runtime code for changes to PropertyCells
      >   and make sure that a certain protocol is followed that allows
      >   concurrent reads from the background thread.
      > - Improve interface of PropertyCell in various ways.
      >
      > Bug: v8:7790
      > Change-Id: If3d7926c3b894808811348b4b2bed153f5c06897
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2661462
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Commit-Queue: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72586}
      
      TBR=ulan@chromium.org,neis@chromium.org,verwaest@chromium.org,nicohartmann@chromium.org
      
      Change-Id: Id04145760c49fa379bc5a3fc16eba664025a9180
      Bug: v8:7790
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2685125Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Georg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72619}
      87df0b7e
  33. 09 Feb, 2021 1 commit
  34. 04 Feb, 2021 1 commit
  35. 19 Jan, 2021 2 commits