Commit 3e1d2221 authored by Dan Elphick's avatar Dan Elphick Committed by V8 LUCI CQ

[snapshot] Add flag to skip checksumming

For very large snapshots, calculating the checksum of the snapshot can
take at least 30% of the time to deserialize the snapshot, so add a flag
to skip it.

Change-Id: I8f3418f1d1e9f984e7334ac51096a1a166874722
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3001176
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75548}
parent 3b3c7d92
......@@ -1669,6 +1669,8 @@ DEFINE_BOOL(rcs_cpu_time, false,
DEFINE_IMPLICATION(rcs_cpu_time, rcs)
// snapshot-common.cc
DEFINE_BOOL(skip_snapshot_checksum, false,
"Skip snapshot checksum calculation when deserializing an Isolate.")
DEFINE_BOOL(profile_deserialization, false,
"Print the time it takes to deserialize the snapshot.")
DEFINE_BOOL(serialization_statistics, false,
......
......@@ -154,7 +154,9 @@ bool Snapshot::Initialize(Isolate* isolate) {
const v8::StartupData* blob = isolate->snapshot_blob();
SnapshotImpl::CheckVersion(blob);
CHECK(VerifyChecksum(blob));
if (!FLAG_skip_snapshot_checksum) {
CHECK(VerifyChecksum(blob));
}
base::Vector<const byte> startup_data =
SnapshotImpl::ExtractStartupData(blob);
base::Vector<const byte> read_only_data =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment