Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: src/snapshot-common.cc

Issue 996213003: Hide native Date implementation in function context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: padded formatting Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/snapshot-common.cc
diff --git a/src/snapshot-common.cc b/src/snapshot-common.cc
index 4542f72c1fb41b4f0d9086ae947defb601c873b7..a3e5e02511cc2315b067acdf4db4bd946f3909c3 100644
--- a/src/snapshot-common.cc
+++ b/src/snapshot-common.cc
@@ -98,6 +98,23 @@ void CalculateFirstPageSizes(bool is_default_snapshot,
context_snapshot.Reservations();
int startup_index = 0;
int context_index = 0;
+
+ if (FLAG_profile_deserialization) {
+ int startup_total = 0;
+ int context_total = 0;
+ for (auto& reservation : startup_reservations) {
+ startup_total += reservation.chunk_size();
+ }
+ for (auto& reservation : context_reservations) {
+ context_total += reservation.chunk_size();
+ }
+ PrintF(
+ "Deserialization will reserve:\n"
+ "%*d bytes for startup\n"
+ "%*d bytes per context\n",
+ 10, startup_total, 10, context_total);
+ }
+
for (int space = 0; space < i::Serializer::kNumberOfSpaces; space++) {
bool single_chunk = true;
while (!startup_reservations[startup_index].is_last()) {
@@ -166,6 +183,14 @@ v8::StartupData Snapshot::CreateSnapshotBlob(
memcpy(data + kStartupDataOffset, startup_data.begin(), startup_length);
memcpy(data + context_offset, context_data.begin(), context_length);
v8::StartupData result = {data, length};
+
+ if (FLAG_profile_deserialization) {
+ PrintF(
+ "Snapshot blob consists of:\n"
+ "%*d bytes for startup\n"
+ "%*d bytes for context\n",
+ 10, startup_length, 10, context_length);
+ }
return result;
}
« src/i18n.js ('K') | « src/math.js ('k') | src/third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698