• Yang Guo's avatar
    [snapshot] add checksum to startup snapshot · bcb8d49b
    Yang Guo authored
    We already had checksumming for code cache data. We now extend
    checksumming to the startup snapshot to catch data corruption early.
    
    The performance impact for deserialization is a regression of 1-2%,
    which should be acceptable.
    
    Sample output for the included test with --profile-deserialization:
    
    [Verifying snapshot checksum took 0.023 ms]
    [Deserializing isolate (134348 bytes) took 1.891 ms]
    [Verifying snapshot checksum took 0.024 ms]
    [Deserializing isolate (134348 bytes) took 1.654 ms]
    [Deserializing context #0 (47208 bytes) took 0.331 ms]
    Deserialization will reserve:
        208168 bytes per isolate
        123368 bytes per context #0
    Snapshot blob consists of:
        134492 bytes in 6 chunks for startup
        115272 bytes for builtins
         47152 bytes in 31 chunks for context #0
    [Verifying snapshot checksum took 0.048 ms]
    [Verifying snapshot checksum took 0.043 ms]
    
    R=peria@chromium.org, petermarshall@chromium.org
    
    Bug: chromium:881417
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Ibc57520d459c86be8972f731aa35045b5e3751d7
    Reviewed-on: https://chromium-review.googlesource.com/1241874Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#56217}
    bcb8d49b
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...