1. 27 May, 2021 2 commits
  2. 26 May, 2021 30 commits
  3. 25 May, 2021 8 commits
    • Milad Fa's avatar
      PPC/S390: Fix builds without webassembly support · 11069a4e
      Milad Fa authored
      This CL assures builds with "v8_enable_webassembly = false"
      compile successfully.
      
      It is an addition on top of this original port:
      e73c7b21
      
      Change-Id: Ic27b3006087e4d4de6fe599a9f469d1f80cf8a8f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918136Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#74769}
      11069a4e
    • Junliang Yan's avatar
      ppc: [liftoff] implement a few Load functions · a4ae746a
      Junliang Yan authored
      Change-Id: Ia709a1c578d05d722690c57ae44019bda4eb8d5d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918213
      Auto-Submit: Junliang Yan <junyan@redhat.com>
      Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
      Commit-Queue: Junliang Yan <junyan@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#74768}
      a4ae746a
    • Jakob Kummerow's avatar
      [wasm-c-api] Optional "dump counters" support · 8f021a42
      Jakob Kummerow authored
      Implementation copied from d8. Gated behind a build-time flag.
      Can be useful for debugging issues.
      
      Change-Id: I444d625242b1fb8fe9139472a06cb1a90269401a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2906233Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74767}
      8f021a42
    • Junliang Yan's avatar
      ppc: replace StorePU by StoreU64WithUpdate · 5e825b72
      Junliang Yan authored
      Change-Id: I795d45a02f49e3a0cc62ce5d87b75a1af7b2dcc1
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917913
      Commit-Queue: Junliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Auto-Submit: Junliang Yan <junyan@redhat.com>
      Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#74766}
      5e825b72
    • Milad Fa's avatar
      PPC/S390: Use bit_cast instead of reinterpret_cast on S128Const · 17ad3bce
      Milad Fa authored
      Change-Id: Idb38b9f97b5a507abd6f65f0d6c126255069f979
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917914Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#74765}
      17ad3bce
    • Paolo Severini's avatar
      Fix failing mjsunit/compiler/call-with-arraylike-or-spread* · 9e4c05a8
      Paolo Severini authored
      Fixes an issue with tests mjsunit/compiler/call-with-arraylike-or-spread*
      that fail when run with the fuzzer.
      
      Bug: v8:11821
      Change-Id: I6b75c065397d66062a7f552198ca92d151d89a4b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917814Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Paolo Severini <paolosev@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#74764}
      9e4c05a8
    • Daniel Lehmann's avatar
      [wasm] Fix mprotect calls, lock contention of write protection · bdd4a6b7
      Daniel Lehmann authored
      For mprotect-based write protection of WebAssembly code memory, we open
      {NativeModuleModificationScope}s each time a thread needs write-access
      to the code space. While fine-grained switching is good for security
      (the permission should only be granted for as short as possible,
      especially since it is process-wide), this can degrade performance
      considerably for two reasons (we measured up to 10x slower Liftoff
      compilation time cf. having no write protection):
      
      1. Switching permissions with mprotect() (and likely with similar
      functions on non-POSIX platforms) is just inherently expensive due to
      the syscall, modifying page tables, and potentially subsequent TLB
      flushes. For a simple benchmark (compiling Unity with --liftoff-only)
      --wasm-write-protect-code-memory increases the number of mprotect
      syscalls from ~2.6-2.8k to 6-8k (!).
      
      2. Modifying the permissions in {SetWritable()} is synchronized
      across threads via the {NativeModule::allocator_mutex_}. With many fine-
      grained permission switching requests, lock contention on this mutex
      incurs a very high number of futex syscalls (measured on Linux only,
      but the problem is likely a general one). For the same simple benchmark
      as above (compiling Unity), --wasm-write-protect-code-memory increases
      the number of futex syscalls from ~1k to 20-40k (!).
      
      Both problems are fixed in the CL here, following this simple recipe
      (in case we get more of these issues in the future):
      1. Identify the hot syscall either via sampling-based profiling with
      `sudo perf record -g -F10000 d8 ...` (needs sudo for kernel stacks) and
      then looking into the record or a flamegraph, or with event-based
      profiling with `sudo perf stat -g -e 'syscalls:sys_enter*' d8 ...`.
      In particular, if {NativeModuleModificationScope}s are repeatedly
      opened (behind a function) in a loop, this can be a problem.
      2. Add a scope object outside of the loop, potentially to a function
      upwards in the call hierarchy of the hot loop/function.
      3. Remove the scope object in the innermost function/hot loop.
      4. Check all callers of the hot function (which now no longer has a
      scope object), whether additional scopes need to be added there for
      correctness.
      
      The following two offenders were especially visible in the profile:
      - Most of the mprotect calls were coming from {PatchJumpTablesLocked}.
      Pulled the scope object up into {PublishCode}.
      - Most of the lock contention was caused by {AddCodeWithCodeSpace}.
      There already was a scope object up the call chain in {AddCompiledCode}.
      - Fixed scope inside the loop in {FreeCode} for good measure as well.
      
      R=clemensb@chromium.org
      CC=​​​jkummerow@chromium.org
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
      
      Bug: v8:11663, chromium:932033
      Change-Id: I89e4a1f0998f06e4d4b5e360e0bf81836d4240f7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912786
      Commit-Queue: Daniel Lehmann <dlehmann@google.com>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74763}
      bdd4a6b7
    • Igor Sheludko's avatar
      [wasm-gc] Fix no-wasm builds · 4b97d779
      Igor Sheludko authored
      Bug: v8:11804
      Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
      Change-Id: I81ba1408fb2701450a82c4abc29d2422746af78e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917041
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74762}
      4b97d779