• Benedikt Meurer's avatar
    [map] Support in-place field representation changes. · f11ba854
    Benedikt Meurer authored
    This adds a new flag --modify-field-representation-inplace (enabled by
    default), which lets the runtime perform field representation changes
    for Smi to Tagged or for HeapObject to Tagged in-place instead of
    creating new maps and marking the previous map tree as deprecated.
    
    That means we create (a lot) fewer Maps and DescriptorArrays in the
    beginning and also need to self-heal fewer objects later (migrating
    off the deprecated maps). In TurboFan we just take the "field owner
    dependency" whenever we use the field representation, which is very
    similar to what we already do for the field types. That means if we
    change the representation of a field that we used in optimized code,
    we will simply deoptimize that code and have TurboFan potentially
    later optimize it again with the new field representation.
    
    On the Speedometer2/ElmJS-TodoMVC test, this reduces the total execution
    time from around 415ms to around 352ms, which corresponds to a **15%**
    improvement. The overall Speedometer2 score improves from around 74.1
    to around 78.3 (on local runs with content_shell), corresponding to a
    **5.6%** improvement here. 🎉
    
    On the CNN desktop browsing story, it seems that we reduce map space
    utilization/fragmentation by about 4-5%. But since we allocate a lot
    less (fewer Maps and DescriptorArrays) we also significantly change
    the GC timing, which heavily influences the results here. So take this
    with a grain of salt. 🤷
    
    Note: For Double fields, this doesn't change anything, meaning they
    still create new maps and deprecate the previous map trees.
    
    Bug: v8:8749, v8:8865, v8:9114
    Change-Id: Ibd70efcb59be982863905663dbfaa89aa5b31e14
    Cq-Include-Trybots: luci.chromium.try:linux-rel,win7-rel
    Doc: http://bit.ly/v8-in-place-field-representation-changes
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1565891
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#60822}
    f11ba854
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...