• Jakob Gruber's avatar
    [compiler] Track the maximal unoptimized frame size · 1e472c42
    Jakob Gruber authored
    This is another step towards considering the unoptimized frame size in
    stack checks within optimized code.
    
    With the changes in this CL, we now keep track of the maximal
    unoptimized frame size of the function that is currently being
    compiled. An optimized function may inline multiple unoptimized
    functions, so a single optimized frame can deopt to multiple
    frames. The real frame size thus differs in different parts of the
    optimized function.
    
    We only care about the maximal frame size, which we calculate
    conservatively as an over-approximation, and track in
    InstructionSelector::max_unoptimized_frame_height_ for now. In future
    work, this value will be passed on to codegen, where it will be
    applied as an offset to the stack pointer during the stack check.
    
    (The motivation behind this is to avoid stack overflows through deopts,
    caused by size differences between optimized and unoptimized frames.)
    
    Note that this offset only ensure that the topmost optimized frame can
    deopt without overflowing the stack limit. That's fine, because we only
    deopt optimized frames one at a time. Other (non-topmost) frames are
    only deoptimized once they are returned to.
    
    Drive-by: Print variable and total frame height in --trace-deopt.
    
    Bug: v8:9534
    Change-Id: I821684a9da93bff59c20c8ab226105e7e12d93eb
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1762024
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Auto-Submit: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#63330}
    1e472c42
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...
.flake8 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...
COMMON_OWNERS Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS 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...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...