• bmeurer's avatar
    [turbofan] Collect invocation counts and compute relative call frequencies. · c7d7ca36
    bmeurer authored
    Add a notion of "invocation count" to the baseline compilers, which
    increment a special slot in the TypeFeedbackVector for each invocation
    of a given function (the optimized code doesn't currently collect this
    information).
    
    Use this invocation count to relativize the call counts on the call
    sites within the function, so that the inlining heuristic has a view
    of relative importance of a call site rather than some absolute numbers
    with unclear meaning for the current function. Also apply the call site
    frequency as a factor to all frequencies in the inlinee by passing this
    to the graph builders so that the importance of a call site in an
    inlinee is relative to the topmost optimized function.
    
    Note that all functions that neither have literals nor need type
    feedback slots will share a single invocation count cell in the
    canonical empty type feedback vector, so their invocation count is
    meaningless, but that doesn't matter since we only use the invocation
    count to relativize call counts within the function, which we only have
    if we have at least one type feedback vector (the CallIC slot).
    
    See the design document for additional details on this change:
    https://docs.google.com/document/d/1VoYBhpDhJC4VlqMXCKvae-8IGuheBGxy32EOgC2LnT8
    
    BUG=v8:5267,v8:5372
    R=mvstanton@chromium.org,rmcilroy@chromium.org,mstarzinger@chromium.org
    
    Review-Url: https://codereview.chromium.org/2337123003
    Cr-Commit-Position: refs/heads/master@{#39410}
    c7d7ca36
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles 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/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn 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...
Makefile Loading commit data...
Makefile.android 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...