• Benedikt Meurer's avatar
    [x64] Teach ArgumentsAdaptorTrampoline about is_safe_to_skip_adapt_arguments. · 07ee7ead
    Benedikt Meurer authored
    This adds support for dynamically checking the newly introduced
    is_safe_to_skip_adapt_arguments flag on the SharedFunctionInfo inside
    the ArgumentsAdaptorTrampoline builtin, so that if there's an arguments
    mismatch, but said bit is set, we can just massage the current stack
    frame according to the SharedFunctionInfo and don't need to create an
    arguments adaptor frame.
    
    This improves the general (baseline) performance of calls with arguments
    mismatches by up to 35%, as can be seen with the test case from the tracking
    bug, which goes from around
    
      callUnderApplication: 608 ms.
      callOverApplication1: 633 ms.
      callOverApplication2: 635 ms.
    
    to
    
      callUnderApplication: 390 ms.
      callOverApplication1: 439 ms.
      callOverApplication2: 443 ms.
    
    when the TurboFan fast-path (that was previously introduced) is forcibly
    disabled. That's a pretty solid baseline improvement and there's probably
    still some room for further improvement (i.e. avoid loading the SFI multiple
    times, etc.).
    
    Drive-by-fix: Refactor and cleanup the ArgumentsAdaptorTrampoline
    builtin a bit to make it more efficient and easier to read (it's still
    pretty messy, but I don't wanna change too many things at once).
    
    This is only the initial x64 port, since for ia32 we're really short on
    registers and it might not even pay off (initial prototype shows a lot
    less performance impact). The arm and arm64 port is in progress and will
    land once ready.
    
    Bug: v8:8834, v8:8895
    Change-Id: I2e1c8e4767a808a43b932487fdedc0e44cdd35c5
    Reviewed-on: https://chromium-review.googlesource.com/c/1488751
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59881}
    07ee7ead
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...