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

Side by Side Diff: runtime/vm/clustered_snapshot.cc

Issue 2416973003: Reapply "Use a single file for app snapshots." (Closed)
Patch Set: sync Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/clustered_snapshot.h" 5 #include "vm/clustered_snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 5269 matching lines...) Expand 10 before | Expand all | Expand 10 after
5280 if (vm_isolate_snapshot_buffer() != NULL) { 5280 if (vm_isolate_snapshot_buffer() != NULL) {
5281 num_base_objects = WriteVmIsolateSnapshot(); 5281 num_base_objects = WriteVmIsolateSnapshot();
5282 ASSERT(num_base_objects != 0); 5282 ASSERT(num_base_objects != 0);
5283 } else { 5283 } else {
5284 num_base_objects = 0; 5284 num_base_objects = 0;
5285 } 5285 }
5286 5286
5287 WriteIsolateFullSnapshot(num_base_objects); 5287 WriteIsolateFullSnapshot(num_base_objects);
5288 5288
5289 if (Snapshot::IncludesCode(kind_)) { 5289 if (Snapshot::IncludesCode(kind_)) {
5290 instructions_writer_->Write(); 5290 instructions_writer_->Write(*vm_isolate_snapshot_buffer_,
5291 vm_isolate_snapshot_size_,
5292 *isolate_snapshot_buffer_,
5293 isolate_snapshot_size_);
5291 5294
5292 OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize()); 5295 OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize());
5293 OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize()); 5296 OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize());
5294 OS::Print("ReadOnlyData(CodeSize): %" Pd "\n", 5297 OS::Print("ReadOnlyData(CodeSize): %" Pd "\n",
5295 instructions_writer_->data_size()); 5298 instructions_writer_->data_size());
5296 OS::Print("Instructions(CodeSize): %" Pd "\n", 5299 OS::Print("Instructions(CodeSize): %" Pd "\n",
5297 instructions_writer_->text_size()); 5300 instructions_writer_->text_size());
5298 intptr_t total = VmIsolateSnapshotSize() + 5301 intptr_t total = VmIsolateSnapshotSize() +
5299 IsolateSnapshotSize() + 5302 IsolateSnapshotSize() +
5300 instructions_writer_->data_size() + 5303 instructions_writer_->data_size() +
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
5338 5341
5339 deserializer.ReadVMSnapshot(); 5342 deserializer.ReadVMSnapshot();
5340 5343
5341 Dart::set_instructions_snapshot_buffer(instructions_buffer_); 5344 Dart::set_instructions_snapshot_buffer(instructions_buffer_);
5342 Dart::set_data_snapshot_buffer(data_buffer_); 5345 Dart::set_data_snapshot_buffer(data_buffer_);
5343 5346
5344 return ApiError::null(); 5347 return ApiError::null();
5345 } 5348 }
5346 5349
5347 } // namespace dart 5350 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698