Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 69bcf7d756ab369d0b9003bccd3f1161c33323f7..8eca750f268727784f14142db40342640ba187c1 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -559,6 +559,10 @@ StartupData SnapshotCreator::CreateBlob( |
} |
data->contexts_.Clear(); |
+#ifdef DEBUG |
+ i::ExternalReferenceTable::instance(isolate)->ResetCount(); |
+#endif // DEBUG |
+ |
i::StartupSerializer startup_serializer(isolate, function_code_handling); |
startup_serializer.SerializeStrongReferences(); |
@@ -572,6 +576,13 @@ StartupData SnapshotCreator::CreateBlob( |
} |
startup_serializer.SerializeWeakReferencesAndDeferred(); |
+ |
+#ifdef DEBUG |
+ if (i::FLAG_external_reference_stats) { |
+ i::ExternalReferenceTable::instance(isolate)->PrintCount(); |
+ } |
+#endif // DEBUG |
+ |
i::SnapshotData startup_snapshot(&startup_serializer); |
StartupData result = |
i::Snapshot::CreateSnapshotBlob(&startup_snapshot, &context_snapshots); |