1. 28 Jul, 2022 1 commit
  2. 18 Oct, 2021 3 commits
  3. 11 Oct, 2021 1 commit
  4. 06 Sep, 2021 1 commit
  5. 10 Aug, 2021 1 commit
  6. 20 Jul, 2021 1 commit
  7. 22 Jun, 2021 1 commit
  8. 11 Jun, 2021 1 commit
  9. 07 Jun, 2021 1 commit
  10. 02 Jun, 2021 1 commit
  11. 28 Apr, 2021 1 commit
    • Leszek Swirski's avatar
      [sparkplug] Add custom builtin for ToBoolean · 486925b4
      Leszek Swirski authored
      Add a special builtin performing a ToBoolean operation for jumps in
      baseline code, which
      
         a) returns the original value as the first return value, to avoid
            needing to save it in the caller, and
         b) returns the true/false value as a Smi, to make the baseline-side
            comparison a cheap comparison against zero.
      
      This reduces JumpIfToBoolean (on x64) from ~40 to ~30 bytes.
      
      Bug: v8:11420
      Change-Id: Idee51405b1e450cdd11ccb45ed82ddbc9119ae74
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2854654
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Commit-Queue: Patrick Thier <pthier@chromium.org>
      Reviewed-by: 's avatarPatrick Thier <pthier@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74239}
      486925b4
  12. 26 Apr, 2021 1 commit
  13. 21 Apr, 2021 1 commit
  14. 16 Apr, 2021 3 commits
    • Leszek Swirski's avatar
      Reland "[codegen] Add static interface descriptors" · 2871e05c
      Leszek Swirski authored
      This is a reland of ae0752df
      
      Reland fixes:
      
        * Remove UNREACHABLE() from constexpr switch, since we don't have a
          CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
          enum anyway).
        * Fix IsRegisterArray trait to use public inheritance and size_t for
          std::array size.
      
      Original change's description:
      > [codegen] Add static interface descriptors
      >
      > Add a new CRTP StaticCallInterfaceDescriptor class, which provides
      > static constexpr getters for a descriptor's registers, parameter counts,
      > and so on. Each CallInterfaceDescriptor subclass is changed to extend
      > StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
      > extending CallInterfaceDescriptor to still provide a dynamic lookup
      > where needed.
      >
      > StaticCallInterfaceDescriptor provides a couple of customisation points,
      > where it reads its CRTP derived descriptor's static fields and
      > functions, with default fallbacks where appropriate. With these
      > customisation points, the definition of CallInterfaceDescriptor
      > subclasses is simplified to:
      >
      >     a) Providing parameter names (as before)
      >     b) Providing parameter types (as before)
      >     c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
      >        static booleans on the class.
      >     d) Optionally providing a `registers()` method that returns a
      >        std::array<Register, N> of registers that may be used for
      >        parameters (if not provided, this defaults to the implementation
      >        specific default register set).
      >
      > Parameter registers (and register count) are automagically set based on
      > the number of parameters and number of given registers, with extra magic
      > to ignore no_reg registers (to reduce ia32 special casing). The
      > CallInterfaceDescriptorData is initialized based on these static
      > functions, rather than manual per-descriptor initializers.
      >
      > This allows us to skip loading descriptors dynamically for CallBuiltin
      > in Sparkplug, and instead lets us use a bit of template magic to
      > statically set up arguments for the calls. Any other users of statically
      > known descriptors will also benefit, thanks to C++ picking the static
      > methods over the dynamic methods on the base class when available.
      >
      > Because we can remove various virtual functions and trigger heavier
      > inlining of constantly known values, binary size slightly decreases with
      > this change.
      >
      > Note that torque-generated descriptors are changed to use the same magic,
      > rather than having Torque-specific magic, for consistency.
      >
      > Bug: v8:11420
      > Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
      > Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73996}
      
      TBR=nicohartmann@chromium.org,clemensb@chromium.org,ishell@chromium.org,clemensb@chromium.org
      
      Bug: v8:11420
      Change-Id: Icd1f6cdb3c178e74460044b1e9623139929ceba8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831872Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74010}
      2871e05c
    • Leszek Swirski's avatar
      Revert "[codegen] Add static interface descriptors" · 5dea60d6
      Leszek Swirski authored
      This reverts commit ae0752df.
      
      Reason for revert: Predictably, constexpr issues on non-clang compilers.
      
      Original change's description:
      > [codegen] Add static interface descriptors
      >
      > Add a new CRTP StaticCallInterfaceDescriptor class, which provides
      > static constexpr getters for a descriptor's registers, parameter counts,
      > and so on. Each CallInterfaceDescriptor subclass is changed to extend
      > StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
      > extending CallInterfaceDescriptor to still provide a dynamic lookup
      > where needed.
      >
      > StaticCallInterfaceDescriptor provides a couple of customisation points,
      > where it reads its CRTP derived descriptor's static fields and
      > functions, with default fallbacks where appropriate. With these
      > customisation points, the definition of CallInterfaceDescriptor
      > subclasses is simplified to:
      >
      >     a) Providing parameter names (as before)
      >     b) Providing parameter types (as before)
      >     c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
      >        static booleans on the class.
      >     d) Optionally providing a `registers()` method that returns a
      >        std::array<Register, N> of registers that may be used for
      >        parameters (if not provided, this defaults to the implementation
      >        specific default register set).
      >
      > Parameter registers (and register count) are automagically set based on
      > the number of parameters and number of given registers, with extra magic
      > to ignore no_reg registers (to reduce ia32 special casing). The
      > CallInterfaceDescriptorData is initialized based on these static
      > functions, rather than manual per-descriptor initializers.
      >
      > This allows us to skip loading descriptors dynamically for CallBuiltin
      > in Sparkplug, and instead lets us use a bit of template magic to
      > statically set up arguments for the calls. Any other users of statically
      > known descriptors will also benefit, thanks to C++ picking the static
      > methods over the dynamic methods on the base class when available.
      >
      > Because we can remove various virtual functions and trigger heavier
      > inlining of constantly known values, binary size slightly decreases with
      > this change.
      >
      > Note that torque-generated descriptors are changed to use the same magic,
      > rather than having Torque-specific magic, for consistency.
      >
      > Bug: v8:11420
      > Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
      > Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73996}
      
      Bug: v8:11420
      Change-Id: Ie5469c9253fc140590ac30b72db6eb1d93f86806
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831485
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/master@{#74000}
      5dea60d6
    • Leszek Swirski's avatar
      [codegen] Add static interface descriptors · ae0752df
      Leszek Swirski authored
      Add a new CRTP StaticCallInterfaceDescriptor class, which provides
      static constexpr getters for a descriptor's registers, parameter counts,
      and so on. Each CallInterfaceDescriptor subclass is changed to extend
      StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
      extending CallInterfaceDescriptor to still provide a dynamic lookup
      where needed.
      
      StaticCallInterfaceDescriptor provides a couple of customisation points,
      where it reads its CRTP derived descriptor's static fields and
      functions, with default fallbacks where appropriate. With these
      customisation points, the definition of CallInterfaceDescriptor
      subclasses is simplified to:
      
          a) Providing parameter names (as before)
          b) Providing parameter types (as before)
          c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
             static booleans on the class.
          d) Optionally providing a `registers()` method that returns a
             std::array<Register, N> of registers that may be used for
             parameters (if not provided, this defaults to the implementation
             specific default register set).
      
      Parameter registers (and register count) are automagically set based on
      the number of parameters and number of given registers, with extra magic
      to ignore no_reg registers (to reduce ia32 special casing). The
      CallInterfaceDescriptorData is initialized based on these static
      functions, rather than manual per-descriptor initializers.
      
      This allows us to skip loading descriptors dynamically for CallBuiltin
      in Sparkplug, and instead lets us use a bit of template magic to
      statically set up arguments for the calls. Any other users of statically
      known descriptors will also benefit, thanks to C++ picking the static
      methods over the dynamic methods on the base class when available.
      
      Because we can remove various virtual functions and trigger heavier
      inlining of constantly known values, binary size slightly decreases with
      this change.
      
      Note that torque-generated descriptors are changed to use the same magic,
      rather than having Torque-specific magic, for consistency.
      
      Bug: v8:11420
      Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73996}
      ae0752df
  15. 09 Apr, 2021 1 commit
  16. 29 Mar, 2021 1 commit
  17. 25 Mar, 2021 1 commit
  18. 23 Mar, 2021 1 commit
    • Leszek Swirski's avatar
      [sparkplug] Include calls in stack guard · be3c0126
      Leszek Swirski authored
      Calculate the maximum call size in the bytecode pre-visit, and pass that
      (along with the bytecode's frame size) to the prologue to be included in
      the stack check. This avoids doing a stack check before each call, and
      mirrors a similar optimisation in TurboFan.
      
      Also, use StackGuardWithGap instead of StackGuard, to make sure that
      stack overflows in the prologue actually trigger stack overflows in the
      runtime.
      
      Bug: v8:11420
      Fixed: chromium:1189890
      Change-Id: I795c197c20f85611318ab09c7bca78ce40b64924
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2778278
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73600}
      be3c0126
  19. 17 Mar, 2021 1 commit
  20. 09 Mar, 2021 1 commit
    • pthier's avatar
      Reland "[sparkplug] Change bytecode offset mapping and introduce iterator." · 2966c896
      pthier authored
      This is a reland of a8b61ef5
      
      The main reason for the revert was not related to this CL and was fixed
      with https://crrev.com/c/2739646
      In addition debug output in d8.test.verifySourcePositions was removed
      due to TSAN complaints.
      
      Original change's description:
      > [sparkplug] Change bytecode offset mapping and introduce iterator.
      >
      > Previously, we recorded pairs of (bytecode offset, sparkplug pc) to
      > create a mapping of bytecode offset <-> sparkplug pc.
      > These pairs were only recorded after builtin/runtime calls.
      > In preparation for deoptimizing to Sparkplug, we need a more precise
      > mapping.
      > With this CL, we record positions for every bytecode. Instead of storing
      > a pair of (bytecode offset, sparkplug pc), we store only the pc,
      > calculating the bytecode offset from the index in the mapping table.
      > For easier use an iterator to access the mapping is introduced.
      >
      > Drive-by: Reduce sampling interval in cpu-profiler cctest to get rid of
      flaky failures.
      >
      > Bug: v8:11420, v8:11429
      > Change-Id: I36a9171f43a574eb67880cbca6cf9ff7ab291e60
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720189
      > Reviewed-by: Victor Gomes <victorgomes@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Auto-Submit: Patrick Thier <pthier@chromium.org>
      > Commit-Queue: Patrick Thier <pthier@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73186}
      >
      > Change-Id: I9ab4cb60da002ef130f8a21ad10ba69e2826a7b6
      
      Change-Id: I9ab4cb60da002ef130f8a21ad10ba69e2826a7b6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2745335Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Patrick Thier <pthier@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73293}
      2966c896
  21. 08 Mar, 2021 2 commits
  22. 04 Mar, 2021 2 commits
    • Maya Lekova's avatar
      Revert "[sparkplug] Change bytecode offset mapping and introduce iterator." · 6fa780ff
      Maya Lekova authored
      This reverts commit a8b61ef5.
      
      Reason for revert: Looks like it breaks GC stress bot - https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/35880/overview
      
      Original change's description:
      > [sparkplug] Change bytecode offset mapping and introduce iterator.
      >
      > Previously, we recorded pairs of (bytecode offset, sparkplug pc) to
      > create a mapping of bytecode offset <-> sparkplug pc.
      > These pairs were only recorded after builtin/runtime calls.
      > In preparation for deoptimizing to Sparkplug, we need a more precise
      > mapping.
      > With this CL, we record positions for every bytecode. Instead of storing
      > a pair of (bytecode offset, sparkplug pc), we store only the pc,
      > calculating the bytecode offset from the index in the mapping table.
      > For easier use an iterator to access the mapping is introduced.
      >
      > Drive-by: Reduce sampling interval in cpu-profiler cctest to get rid of
      > flaky failures.
      >
      > Bug: v8:11420, v8:11429
      > Change-Id: I36a9171f43a574eb67880cbca6cf9ff7ab291e60
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720189
      > Reviewed-by: Victor Gomes <victorgomes@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Auto-Submit: Patrick Thier <pthier@chromium.org>
      > Commit-Queue: Patrick Thier <pthier@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73186}
      
      Bug: v8:11420
      Bug: v8:11429
      Change-Id: Ie71e7ce234e7b9ab9a2ec99a983e9900f35baa44
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735397
      Auto-Submit: Maya Lekova <mslekova@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/master@{#73187}
      6fa780ff
    • pthier's avatar
      [sparkplug] Change bytecode offset mapping and introduce iterator. · a8b61ef5
      pthier authored
      Previously, we recorded pairs of (bytecode offset, sparkplug pc) to
      create a mapping of bytecode offset <-> sparkplug pc.
      These pairs were only recorded after builtin/runtime calls.
      In preparation for deoptimizing to Sparkplug, we need a more precise
      mapping.
      With this CL, we record positions for every bytecode. Instead of storing
      a pair of (bytecode offset, sparkplug pc), we store only the pc,
      calculating the bytecode offset from the index in the mapping table.
      For easier use an iterator to access the mapping is introduced.
      
      Drive-by: Reduce sampling interval in cpu-profiler cctest to get rid of
      flaky failures.
      
      Bug: v8:11420, v8:11429
      Change-Id: I36a9171f43a574eb67880cbca6cf9ff7ab291e60
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720189Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Auto-Submit: Patrick Thier <pthier@chromium.org>
      Commit-Queue: Patrick Thier <pthier@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73186}
      a8b61ef5
  23. 25 Feb, 2021 1 commit
  24. 24 Feb, 2021 1 commit
  25. 22 Feb, 2021 1 commit
  26. 19 Feb, 2021 1 commit
  27. 16 Feb, 2021 1 commit
    • Leszek Swirski's avatar
      [sparkplug] Rename bytecode tracing functions · 0067fbb1
      Leszek Swirski authored
      Change the interpreter tracing functions to be generic unoptimized code
      tracing functions. The type of the code is now inferred from the frame,
      rather than passed in.
      
      Also expands the set of gn flags to explicitly enable unoptimized
      tracing, with a helper gn flags for enabling it for Ignition and for
      baseline (both just set unoptimized tracing to be enabled for now, we
      could split this up in the future though), and V8 flags separate tracing
      Ignition and tracing baseline.
      
      Bug: v8:11420, v8:11429
      Change-Id: I040c2628fe5744dcb38ef8623df3e34f9c86a5b8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692817
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72767}
      0067fbb1
  28. 15 Feb, 2021 2 commits
  29. 12 Feb, 2021 1 commit