| 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 5436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5447 | 5447 |
| 5448 void FullSnapshotWriter::WriteFullSnapshot() { | 5448 void FullSnapshotWriter::WriteFullSnapshot() { |
| 5449 intptr_t num_base_objects; | 5449 intptr_t num_base_objects; |
| 5450 if (vm_snapshot_data_buffer() != NULL) { | 5450 if (vm_snapshot_data_buffer() != NULL) { |
| 5451 num_base_objects = WriteVMSnapshot(); | 5451 num_base_objects = WriteVMSnapshot(); |
| 5452 ASSERT(num_base_objects != 0); | 5452 ASSERT(num_base_objects != 0); |
| 5453 } else { | 5453 } else { |
| 5454 num_base_objects = 0; | 5454 num_base_objects = 0; |
| 5455 } | 5455 } |
| 5456 | 5456 |
| 5457 WriteIsolateSnapshot(num_base_objects); | 5457 if (isolate_snapshot_data_buffer() != NULL) { |
| 5458 WriteIsolateSnapshot(num_base_objects); |
| 5459 } |
| 5458 | 5460 |
| 5459 if (FLAG_print_snapshot_sizes) { | 5461 if (FLAG_print_snapshot_sizes) { |
| 5460 OS::Print("VMIsolate(CodeSize): %" Pd "\n", clustered_vm_size_); | 5462 OS::Print("VMIsolate(CodeSize): %" Pd "\n", clustered_vm_size_); |
| 5461 OS::Print("Isolate(CodeSize): %" Pd "\n", clustered_isolate_size_); | 5463 OS::Print("Isolate(CodeSize): %" Pd "\n", clustered_isolate_size_); |
| 5462 OS::Print("ReadOnlyData(CodeSize): %" Pd "\n", mapped_data_size_); | 5464 OS::Print("ReadOnlyData(CodeSize): %" Pd "\n", mapped_data_size_); |
| 5463 OS::Print("Instructions(CodeSize): %" Pd "\n", mapped_instructions_size_); | 5465 OS::Print("Instructions(CodeSize): %" Pd "\n", mapped_instructions_size_); |
| 5464 OS::Print("Total(CodeSize): %" Pd "\n", | 5466 OS::Print("Total(CodeSize): %" Pd "\n", |
| 5465 clustered_vm_size_ + clustered_isolate_size_ + mapped_data_size_ + | 5467 clustered_vm_size_ + clustered_isolate_size_ + mapped_data_size_ + |
| 5466 mapped_instructions_size_); | 5468 mapped_instructions_size_); |
| 5467 } | 5469 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5529 thread_->isolate()->SetupImagePage(data_buffer_, | 5531 thread_->isolate()->SetupImagePage(data_buffer_, |
| 5530 /* is_executable */ false); | 5532 /* is_executable */ false); |
| 5531 } | 5533 } |
| 5532 | 5534 |
| 5533 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); | 5535 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); |
| 5534 | 5536 |
| 5535 return ApiError::null(); | 5537 return ApiError::null(); |
| 5536 } | 5538 } |
| 5537 | 5539 |
| 5538 } // namespace dart | 5540 } // namespace dart |
| OLD | NEW |