1. 01 Jun, 2022 1 commit
  2. 30 May, 2022 1 commit
  3. 28 May, 2022 2 commits
  4. 25 May, 2022 1 commit
  5. 20 May, 2022 1 commit
  6. 19 May, 2022 2 commits
  7. 17 May, 2022 1 commit
  8. 16 May, 2022 1 commit
  9. 13 May, 2022 1 commit
  10. 12 May, 2022 1 commit
  11. 10 May, 2022 1 commit
  12. 06 May, 2022 2 commits
  13. 05 May, 2022 2 commits
  14. 29 Apr, 2022 1 commit
    • George Wort's avatar
      Make profile-guided optimization of builtins more configurable · 0e127bce
      George Wort authored
      Introduce get_hints.py and combine_hints.py in order to make
      the interpretation of basic block counts into hints more
      configurable and explicit, as well as allowing more accurate
      and consistent methods of combining multiple profiles.
      
      get_hints.py allows for the minimum count and threshold ratio
      values to be easily altered for different profiles, while
      combine_hints.py allows the hints produced from different
      benchmarks and threshold values to be easily and sensibly
      combined.
      
      Simply summing together basic block counts from different
      benchmarks could previously lead to a longer running benchmark
      overshadowing multiple shorter benchmarks with conflicting
      hints.
      
      Allowing alteration of the current threshold values gives a
      doubling of performance, while the new method of combining
      distinct profiles can double the performance improvement of the
      secondary benchmark while losing as little as 4% of the
      improvement gained in the primary benchmark.
      
      Design doc: https://docs.google.com/document/d/1OhwZnIZom47IX0lyceyt-S9i8AApDB0UqJdvQD6NuKQ/edit?usp=sharing
      
      Bug: v8:10470
      Change-Id: I1c09d1eabfdda5ed6794592e2c13ff8b461be361
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3545181Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: George Wort <george.wort@arm.com>
      Cr-Commit-Position: refs/heads/main@{#80282}
      0e127bce
  15. 28 Apr, 2022 1 commit
    • Igor Sheludko's avatar
      Reland "[rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)" · 449ece38
      Igor Sheludko authored
      This is a reland of commit 9d31f866
      There were issues with --future flag implications on M1.
      
      Original change's description:
      > [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)
      >
      > ... for V8 code space. The feature is currently disabled.
      >
      > In order to use fast W^X permission switching we must allocate
      > executable pages with readable writable executable permissions (RWX).
      > However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further
      > permission changing of RWX memory pages. This means that the code page
      > headers must be allocated with RWX permissions too because otherwise
      > it wouldn't be possible to allocate a large code page over the freed
      > regular code page and vice versa.
      >
      > When enabled, the new machinery works as follows:
      >
      > 1) when memory region is reserved for allocating executable pages, the
      >    whole region is committed with RWX permissions and then decommitted,
      > 2) since reconfiguration of RWX page permissions is not allowed on
      >    MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts
      >    to change them,
      > 3) the request to set RWX permissions in the executable page region
      >    just recommits the pages without changing permissions (see (1), they
      >    were already allocated as RWX and then discarded),
      > 4) in order to make executable pages inaccessible one must use
      >    OS::DiscardSystemPages() instead of OS::DecommitPages() or
      >    setting permissions to kNoAccess because the latter two are not
      >    allowed by the MacOS (see (2)).
      > 5) since code space page headers are allocated as RWX pages it's also
      >    necessary to switch between W^X modes when updating the data in the
      >    page headers (i.e. when marking, updating stats, wiring pages in
      >    lists, etc.). The new CodePageHeaderModificationScope class is used
      >    in the respective places. On unrelated configurations it's a no-op.
      >
      > The fast permission switching can't be used for V8 configuration with
      > enabled pointer compression and disabled external code space because
      > a) the pointer compression cage has to be reserved with MAP_JIT flag
      >    which is too expensive,
      > b) in case of shared pointer compression cage if the code range will
      >    be deleted while the cage is still alive then attempt to configure
      >    permissions of pages that were previously set to RWX will fail.
      >
      > This also CL extends the unmapper unit tests with permissions tracking
      > for discarded pages.
      >
      > Bug: v8:12797
      > Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#80238}
      
      Bug: v8:12797
      Change-Id: I0fe86666f31bad37d7074e217555c95900d2afba
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610433Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80259}
      449ece38
  16. 27 Apr, 2022 4 commits
    • Adam Klein's avatar
      Revert "[rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)" · 10807c9f
      Adam Klein authored
      This reverts commit 9d31f866.
      
      Reason for revert: crashes on Mac/arm64 bots:
      https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug/5923/overview
      
      Original change's description:
      > [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)
      >
      > ... for V8 code space. The feature is currently disabled.
      >
      > In order to use fast W^X permission switching we must allocate
      > executable pages with readable writable executable permissions (RWX).
      > However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further
      > permission changing of RWX memory pages. This means that the code page
      > headers must be allocated with RWX permissions too because otherwise
      > it wouldn't be possible to allocate a large code page over the freed
      > regular code page and vice versa.
      >
      > When enabled, the new machinery works as follows:
      >
      > 1) when memory region is reserved for allocating executable pages, the
      >    whole region is committed with RWX permissions and then decommitted,
      > 2) since reconfiguration of RWX page permissions is not allowed on
      >    MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts
      >    to change them,
      > 3) the request to set RWX permissions in the executable page region
      >    just recommits the pages without changing permissions (see (1), they
      >    were already allocated as RWX and then discarded),
      > 4) in order to make executable pages inaccessible one must use
      >    OS::DiscardSystemPages() instead of OS::DecommitPages() or
      >    setting permissions to kNoAccess because the latter two are not
      >    allowed by the MacOS (see (2)).
      > 5) since code space page headers are allocated as RWX pages it's also
      >    necessary to switch between W^X modes when updating the data in the
      >    page headers (i.e. when marking, updating stats, wiring pages in
      >    lists, etc.). The new CodePageHeaderModificationScope class is used
      >    in the respective places. On unrelated configurations it's a no-op.
      >
      > The fast permission switching can't be used for V8 configuration with
      > enabled pointer compression and disabled external code space because
      > a) the pointer compression cage has to be reserved with MAP_JIT flag
      >    which is too expensive,
      > b) in case of shared pointer compression cage if the code range will
      >    be deleted while the cage is still alive then attempt to configure
      >    permissions of pages that were previously set to RWX will fail.
      >
      > This also CL extends the unmapper unit tests with permissions tracking
      > for discarded pages.
      >
      > Bug: v8:12797
      > Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#80238}
      
      Bug: v8:12797
      Change-Id: Ic07948e036db36326d464a2a901d052aa060a406
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3611665
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Auto-Submit: Adam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80239}
      10807c9f
    • Igor Sheludko's avatar
      [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1) · 9d31f866
      Igor Sheludko authored
      ... for V8 code space. The feature is currently disabled.
      
      In order to use fast W^X permission switching we must allocate
      executable pages with readable writable executable permissions (RWX).
      However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further
      permission changing of RWX memory pages. This means that the code page
      headers must be allocated with RWX permissions too because otherwise
      it wouldn't be possible to allocate a large code page over the freed
      regular code page and vice versa.
      
      When enabled, the new machinery works as follows:
      
      1) when memory region is reserved for allocating executable pages, the
         whole region is committed with RWX permissions and then decommitted,
      2) since reconfiguration of RWX page permissions is not allowed on
         MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts
         to change them,
      3) the request to set RWX permissions in the executable page region
         just recommits the pages without changing permissions (see (1), they
         were already allocated as RWX and then discarded),
      4) in order to make executable pages inaccessible one must use
         OS::DiscardSystemPages() instead of OS::DecommitPages() or
         setting permissions to kNoAccess because the latter two are not
         allowed by the MacOS (see (2)).
      5) since code space page headers are allocated as RWX pages it's also
         necessary to switch between W^X modes when updating the data in the
         page headers (i.e. when marking, updating stats, wiring pages in
         lists, etc.). The new CodePageHeaderModificationScope class is used
         in the respective places. On unrelated configurations it's a no-op.
      
      The fast permission switching can't be used for V8 configuration with
      enabled pointer compression and disabled external code space because
      a) the pointer compression cage has to be reserved with MAP_JIT flag
         which is too expensive,
      b) in case of shared pointer compression cage if the code range will
         be deleted while the cage is still alive then attempt to configure
         permissions of pages that were previously set to RWX will fail.
      
      This also CL extends the unmapper unit tests with permissions tracking
      for discarded pages.
      
      Bug: v8:12797
      Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80238}
      9d31f866
    • Frank Tang's avatar
      [Temporal] Correct typo and extra space · 19e733fd
      Frank Tang authored
      Bug: v8:7834
      Change-Id: Iedd97d665df91ccbdceaaeb68d936b210c31b662
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3611662Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Commit-Queue: Frank Tang <ftang@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80233}
      19e733fd
    • yufeng.freeman's avatar
      Include count value to InvalidCountValue error message · 40605a3d
      yufeng.freeman authored
      This CL includes count value to InvalidCountValue error message to make
      it easier to dignoise RangeError of String.prototype.repeat. When
      InvalidCountValue error throw, we could not know it's
      caused by which count value if count value is not included.
      
      Bug: none
      Change-Id: I16e6693da0fc3b181241cb90daca27957f59c77c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593574Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80198}
      40605a3d
  17. 26 Apr, 2022 1 commit
  18. 22 Apr, 2022 1 commit
  19. 20 Apr, 2022 1 commit
  20. 19 Apr, 2022 1 commit
  21. 18 Apr, 2022 1 commit
    • Deepti Gandluri's avatar
      Revert "[rwx][mac] Introduce RwxMemoryWriteScope" · e73757be
      Deepti Gandluri authored
      This reverts commit 4d8e1846.
      
      Reason for revert: Blocks V8 roll, crbug.com/1316800
      
      Original change's description:
      > [rwx][mac] Introduce RwxMemoryWriteScope
      >
      > ... as a single bottleneck that encapsulates the semantics and
      > implementation of fast per-thread W^X permission switching supported
      > by Apple Silicon (arm64 M1).
      > On other architectures this class is a no-op.
      >
      > Bug: v8:12797
      > Change-Id: Ica842ff9f843e20b7f61fd7e80591e7a1fd29771
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3586986
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79994}
      
      Bug: v8:12797
      Change-Id: I81792567839e72b4147d009c0845b0c0de003eb0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3590752
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
      Owners-Override: Deepti Gandluri <gdeepti@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80007}
      e73757be
  22. 14 Apr, 2022 1 commit
  23. 07 Apr, 2022 1 commit
  24. 04 Apr, 2022 1 commit
  25. 30 Mar, 2022 1 commit
    • Jakob Gruber's avatar
      Refactor OptimizationMarker and ConcurrencyMode enums · 57d985a5
      Jakob Gruber authored
      .. with readability and simplicity in mind.
      
      - Rename OptimizationMarker to the (shorter) TieringState. 'Tiering'
        also matches 'TieringManager' terminology.
      - Rename the values:
        kNone -> kNone
        kInOptimizationQueue -> kInProgress
        kCompileFoo_NotConcurrent -> kRequestFoo_Synchronous
        kCompileFoo_Concurrent -> kRequestFoo_Concurrent
      - Likewise rename ConcurrencyMode::kNotConcurrent to kSynchronous.
      - Add predicates to test enum values.
      - Consistent lower case names for accessors on JSFunction and
        FeedbackVector.
      - Instead of having to call HasOptimizationMarker() before using any
        other accessor, simply have optimization_marker() return kNone if
        no feedback vector exists.
      - Drive-by: Enable the Unreachable() in MaybeOptimizeCode()
        unconditionally - this should never happen, there's no reason not
        to protect against this in release builds as well.
      
      Bug: v8:12161
      Change-Id: I67c03e2b7bd0a6b86d0c64f504ad8cb47e9e26ae
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3555774Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Jakob Linke <jgruber@chromium.org>
      Auto-Submit: Jakob Linke <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79669}
      57d985a5
  26. 28 Mar, 2022 1 commit
    • Dominik Inführ's avatar
      [heap] Initialize pages with placement-new · a8471820
      Dominik Inführ authored
      Define ctors for BasicMemoryChunk, ReadOnlyPage, MemoryChunk, Page and
      LargePage. We can use those with placement-new to initialize pages. We
      now initialize chunks at once either for ReadOnlyPage, Page or
      LargePage. Previously initialization happened in multiple locations
      starting with BasicMemoryChunk::Initialize.
      
      Adding ctors to these classes should improve debugging, since debug
      info for classes without ctors was removed with the compiler flag
      `-fuse-ctor-homing`.
      
      Change-Id: Ib842bb9b1e93a6576cad8299b7c5dbfe299baa33
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3545092Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79638}
      a8471820
  27. 25 Mar, 2022 1 commit
  28. 24 Mar, 2022 1 commit
    • Milad Fa's avatar
      PPC: Introduce Power10 prefixed instructions · d7966ecd
      Milad Fa authored
      P10 comes with prefixed instruction (2 x 4-byte instructions)
      which allow for using larger immediate values. `paddi` has
      been added in this CL which uses a 34-bit immediate.
      
      Prefixed instructions cannot cross 64-byte boundaries, i.e we cannot
      have the first 4-bytes on one side and the second 4-bytes emitted on
      the other side of the boundary. Therefore we need to align generated
      code to 64 bytes and emit a nop whenever the boundary is being crossed
      midway (check emit_prefix).
      
      Change-Id: I90e9953089214e15eeef0d70147ea5943fe05f45
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528993Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/main@{#79612}
      d7966ecd
  29. 21 Mar, 2022 2 commits
  30. 14 Mar, 2022 2 commits
  31. 10 Mar, 2022 1 commit