Index: src/snapshot-common.cc |
diff --git a/src/snapshot-common.cc b/src/snapshot-common.cc |
index 96034e352bc33ebbe8cc1c3b6e5d41667a81f107..4bdf63ceddbf1e1a5670564a7653b50c92d0b5ac 100644 |
--- a/src/snapshot-common.cc |
+++ b/src/snapshot-common.cc |
@@ -102,10 +102,19 @@ bool Snapshot::Initialize(const char* snapshot_file) { |
DeleteArray(str); |
return success; |
} else if (size_ > 0) { |
+ ElapsedTimer timer; |
+ if (FLAG_profile_deserialization) { |
+ timer.Start(); |
+ } |
SnapshotByteSource source(raw_data_, raw_size_); |
Deserializer deserializer(&source); |
ReserveSpaceForLinkedInSnapshot(&deserializer); |
- return V8::Initialize(&deserializer); |
+ bool success = V8::Initialize(&deserializer); |
+ if (FLAG_profile_deserialization) { |
+ double ms = timer.Elapsed().InMillisecondsF(); |
+ PrintF("[Snapshot loading and deserialization took %0.3f ms]\n", ms); |
+ } |
+ return success; |
} |
return false; |
} |