• jbroman's avatar
    Generate less code in v8::internal::Counters constructor · 53562fd9
    jbroman authored
    This saves 72 KiB (approximately 0.1%) of the Chrome APK size of for ARM/Android.
    
    In Counters, each similar group of counters generates a compact data structure,
    which a loop then iterates over, rather than having the full loop unrolled
    (though the compiler will automatically unroll small ones).
    
    In RuntimeCallStats, the compiler was not being clever enough to avoid
    initializing count_ and time_ to zero individually, even after the initialization
    of names was moved into a loop. As a result, RuntimeCallCounter was modified
    to have a non-initializing constructor for exclusive use by RuntimeCallStats,
    which explicitly initializes the counters in a loop. Since v8::base::TimeDelta
    does not support an uninitialized state, time_ was changed to be stored as
    int64_t microseconds internally, which generates the same code (it's the same
    representation as TimeDelta).
    
    BUG=v8:6119
    
    Review-Url: https://codereview.chromium.org/2759033002
    Cr-Commit-Position: refs/heads/master@{#43996}
    53562fd9
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 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...