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

Unified Diff: src/snapshot-external.cc

Issue 653033002: Break deserializer reservations into chunks that fit onto a page. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments and rebase Created 6 years, 2 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
« no previous file with comments | « src/snapshot-common.cc ('k') | src/vector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot-external.cc
diff --git a/src/snapshot-external.cc b/src/snapshot-external.cc
index 9b8bc1b917cc2b5ed5bbd369518ec59f80b91141..838e93f1df0aee3e01aefa605e9fd56e118132e8 100644
--- a/src/snapshot-external.cc
+++ b/src/snapshot-external.cc
@@ -58,17 +58,16 @@ bool Snapshot::Initialize(Isolate* isolate) {
}
SnapshotByteSource source(snapshot_impl_->data, snapshot_impl_->size);
Deserializer deserializer(&source);
- deserializer.set_reservation(NEW_SPACE, snapshot_impl_->new_space_used);
- deserializer.set_reservation(OLD_POINTER_SPACE,
- snapshot_impl_->pointer_space_used);
- deserializer.set_reservation(OLD_DATA_SPACE,
- snapshot_impl_->data_space_used);
- deserializer.set_reservation(CODE_SPACE, snapshot_impl_->code_space_used);
- deserializer.set_reservation(MAP_SPACE, snapshot_impl_->map_space_used);
- deserializer.set_reservation(CELL_SPACE, snapshot_impl_->cell_space_used);
- deserializer.set_reservation(PROPERTY_CELL_SPACE,
- snapshot_impl_->property_cell_space_used);
- deserializer.set_reservation(LO_SPACE, snapshot_impl_->lo_space_used);
+ deserializer.AddReservation(NEW_SPACE, snapshot_impl_->new_space_used);
+ deserializer.AddReservation(OLD_POINTER_SPACE,
+ snapshot_impl_->pointer_space_used);
+ deserializer.AddReservation(OLD_DATA_SPACE, snapshot_impl_->data_space_used);
+ deserializer.AddReservation(CODE_SPACE, snapshot_impl_->code_space_used);
+ deserializer.AddReservation(MAP_SPACE, snapshot_impl_->map_space_used);
+ deserializer.AddReservation(CELL_SPACE, snapshot_impl_->cell_space_used);
+ deserializer.AddReservation(PROPERTY_CELL_SPACE,
+ snapshot_impl_->property_cell_space_used);
+ deserializer.AddReservation(LO_SPACE, snapshot_impl_->lo_space_used);
bool success = isolate->Init(&deserializer);
if (FLAG_profile_deserialization) {
double ms = timer.Elapsed().InMillisecondsF();
@@ -85,22 +84,21 @@ Handle<Context> Snapshot::NewContextFromSnapshot(Isolate* isolate) {
SnapshotByteSource source(snapshot_impl_->context_data,
snapshot_impl_->context_size);
Deserializer deserializer(&source);
- deserializer.set_reservation(NEW_SPACE,
- snapshot_impl_->context_new_space_used);
- deserializer.set_reservation(OLD_POINTER_SPACE,
- snapshot_impl_->context_pointer_space_used);
- deserializer.set_reservation(OLD_DATA_SPACE,
- snapshot_impl_->context_data_space_used);
- deserializer.set_reservation(CODE_SPACE,
- snapshot_impl_->context_code_space_used);
- deserializer.set_reservation(MAP_SPACE,
- snapshot_impl_->context_map_space_used);
- deserializer.set_reservation(CELL_SPACE,
- snapshot_impl_->context_cell_space_used);
- deserializer.set_reservation(PROPERTY_CELL_SPACE,
- snapshot_impl_->
- context_property_cell_space_used);
- deserializer.set_reservation(LO_SPACE, snapshot_impl_->context_lo_space_used);
+ deserializer.AddReservation(NEW_SPACE,
+ snapshot_impl_->context_new_space_used);
+ deserializer.AddReservation(OLD_POINTER_SPACE,
+ snapshot_impl_->context_pointer_space_used);
+ deserializer.AddReservation(OLD_DATA_SPACE,
+ snapshot_impl_->context_data_space_used);
+ deserializer.AddReservation(CODE_SPACE,
+ snapshot_impl_->context_code_space_used);
+ deserializer.AddReservation(MAP_SPACE,
+ snapshot_impl_->context_map_space_used);
+ deserializer.AddReservation(CELL_SPACE,
+ snapshot_impl_->context_cell_space_used);
+ deserializer.AddReservation(PROPERTY_CELL_SPACE,
+ snapshot_impl_->context_property_cell_space_used);
+ deserializer.AddReservation(LO_SPACE, snapshot_impl_->context_lo_space_used);
Object* root;
deserializer.DeserializePartial(isolate, &root);
CHECK(root->IsContext());
« no previous file with comments | « src/snapshot-common.cc ('k') | src/vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698