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

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

Issue 2987213002: [vm] Add Dart_CreateVMAOTSnapshotAsAssembly. (Closed)
Patch Set: . Created 3 years, 4 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 5436 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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