• 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
..
builtins-x64.cc Loading commit data...