OLD | NEW |
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 5270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5281 if (vm_isolate_snapshot_buffer() != NULL) { | 5281 if (vm_isolate_snapshot_buffer() != NULL) { |
5282 num_base_objects = WriteVmIsolateSnapshot(); | 5282 num_base_objects = WriteVmIsolateSnapshot(); |
5283 ASSERT(num_base_objects != 0); | 5283 ASSERT(num_base_objects != 0); |
5284 } else { | 5284 } else { |
5285 num_base_objects = 0; | 5285 num_base_objects = 0; |
5286 } | 5286 } |
5287 | 5287 |
5288 WriteIsolateFullSnapshot(num_base_objects); | 5288 WriteIsolateFullSnapshot(num_base_objects); |
5289 | 5289 |
5290 if (Snapshot::IncludesCode(kind_)) { | 5290 if (Snapshot::IncludesCode(kind_)) { |
5291 instructions_writer_->Write(); | 5291 instructions_writer_->Write(*vm_isolate_snapshot_buffer_, |
| 5292 vm_isolate_snapshot_size_, |
| 5293 *isolate_snapshot_buffer_, |
| 5294 isolate_snapshot_size_); |
5292 | 5295 |
5293 OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize()); | 5296 OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize()); |
5294 OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize()); | 5297 OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize()); |
5295 OS::Print("ReadOnlyData(CodeSize): %" Pd "\n", | 5298 OS::Print("ReadOnlyData(CodeSize): %" Pd "\n", |
5296 instructions_writer_->data_size()); | 5299 instructions_writer_->data_size()); |
5297 OS::Print("Instructions(CodeSize): %" Pd "\n", | 5300 OS::Print("Instructions(CodeSize): %" Pd "\n", |
5298 instructions_writer_->text_size()); | 5301 instructions_writer_->text_size()); |
5299 intptr_t total = VmIsolateSnapshotSize() + | 5302 intptr_t total = VmIsolateSnapshotSize() + |
5300 IsolateSnapshotSize() + | 5303 IsolateSnapshotSize() + |
5301 instructions_writer_->data_size() + | 5304 instructions_writer_->data_size() + |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5339 | 5342 |
5340 deserializer.ReadVMSnapshot(); | 5343 deserializer.ReadVMSnapshot(); |
5341 | 5344 |
5342 Dart::set_instructions_snapshot_buffer(instructions_buffer_); | 5345 Dart::set_instructions_snapshot_buffer(instructions_buffer_); |
5343 Dart::set_data_snapshot_buffer(data_buffer_); | 5346 Dart::set_data_snapshot_buffer(data_buffer_); |
5344 | 5347 |
5345 return ApiError::null(); | 5348 return ApiError::null(); |
5346 } | 5349 } |
5347 | 5350 |
5348 } // namespace dart | 5351 } // namespace dart |
OLD | NEW |