Revision: 17072
Author: [email protected]
Date: Wed Oct 2 11:32:19 2013 UTC
Log: Add flag for printing the time it took to deserialize the
snapshot.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/25695002
http://code.google.com/p/v8/source/detail?r=17072
Modified:
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/snapshot-common.cc
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Wed Oct 2 11:27:37 2013
UTC
+++ /branches/bleeding_edge/src/flag-definitions.h Wed Oct 2 11:32:19 2013
UTC
@@ -595,6 +595,11 @@
"Fixed seed to use to hash property keys (0 means random)"
"(with snapshots this option cannot override the baked-in
seed)")
+// snapshot-common.cc
+DEFINE_bool(profile_deserialization,
+ false,
+ "Print the time it takes to deserialize the snapshot.")
+
// v8.cc
DEFINE_bool(preemption, false,
"activate a 100ms timer that switches between V8 threads")
=======================================
--- /branches/bleeding_edge/src/snapshot-common.cc Tue Sep 3 11:54:08 2013
UTC
+++ /branches/bleeding_edge/src/snapshot-common.cc Wed Oct 2 11:32:19 2013
UTC
@@ -102,10 +102,19 @@
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;
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.