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

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

Issue 2410303008: Revert "Use a single file for app snapshots." (Closed)
Patch Set: 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
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(*vm_isolate_snapshot_buffer_, 5290 instructions_writer_->Write();
5291 vm_isolate_snapshot_size_,
5292 *isolate_snapshot_buffer_,
5293 isolate_snapshot_size_);
5294 5291
5295 OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize()); 5292 OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize());
5296 OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize()); 5293 OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize());
5297 OS::Print("ReadOnlyData(CodeSize): %" Pd "\n", 5294 OS::Print("ReadOnlyData(CodeSize): %" Pd "\n",
5298 instructions_writer_->data_size()); 5295 instructions_writer_->data_size());
5299 OS::Print("Instructions(CodeSize): %" Pd "\n", 5296 OS::Print("Instructions(CodeSize): %" Pd "\n",
5300 instructions_writer_->text_size()); 5297 instructions_writer_->text_size());
5301 intptr_t total = VmIsolateSnapshotSize() + 5298 intptr_t total = VmIsolateSnapshotSize() +
5302 IsolateSnapshotSize() + 5299 IsolateSnapshotSize() +
5303 instructions_writer_->data_size() + 5300 instructions_writer_->data_size() +
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
5341 5338
5342 deserializer.ReadVMSnapshot(); 5339 deserializer.ReadVMSnapshot();
5343 5340
5344 Dart::set_instructions_snapshot_buffer(instructions_buffer_); 5341 Dart::set_instructions_snapshot_buffer(instructions_buffer_);
5345 Dart::set_data_snapshot_buffer(data_buffer_); 5342 Dart::set_data_snapshot_buffer(data_buffer_);
5346 5343
5347 return ApiError::null(); 5344 return ApiError::null();
5348 } 5345 }
5349 5346
5350 } // namespace dart 5347 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698