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

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

Issue 2909403002: When deduplicating program metadata, try to use objects from the VM isolate. (Closed)
Patch Set: sync Created 3 years, 3 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 | « no previous file | runtime/vm/clustered_snapshot.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 #ifndef RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ 5 #ifndef RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
6 #define RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ 6 #define RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 class Serializer : public StackResource { 114 class Serializer : public StackResource {
115 public: 115 public:
116 Serializer(Thread* thread, 116 Serializer(Thread* thread,
117 Snapshot::Kind kind, 117 Snapshot::Kind kind,
118 uint8_t** buffer, 118 uint8_t** buffer,
119 ReAlloc alloc, 119 ReAlloc alloc,
120 intptr_t initial_size, 120 intptr_t initial_size,
121 ImageWriter* image_writer_); 121 ImageWriter* image_writer_);
122 ~Serializer(); 122 ~Serializer();
123 123
124 intptr_t WriteVMSnapshot(const Array& symbols, const Array& scripts); 124 intptr_t WriteVMSnapshot(const Array& symbols,
125 ZoneGrowableArray<Object*>* seed_objects,
126 ZoneGrowableArray<Code*>* seed_code);
125 void WriteIsolateSnapshot(intptr_t num_base_objects, 127 void WriteIsolateSnapshot(intptr_t num_base_objects,
126 ObjectStore* object_store); 128 ObjectStore* object_store);
127 129
128 void AddVMIsolateBaseObjects(); 130 void AddVMIsolateBaseObjects();
129 131
130 void AddBaseObject(RawObject* base_object) { 132 void AddBaseObject(RawObject* base_object) {
131 AssignRef(base_object); 133 AssignRef(base_object);
132 num_base_objects_++; 134 num_base_objects_++;
133 } 135 }
134 136
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 Thread* thread_; 414 Thread* thread_;
413 Snapshot::Kind kind_; 415 Snapshot::Kind kind_;
414 uint8_t** vm_snapshot_data_buffer_; 416 uint8_t** vm_snapshot_data_buffer_;
415 uint8_t** isolate_snapshot_data_buffer_; 417 uint8_t** isolate_snapshot_data_buffer_;
416 ReAlloc alloc_; 418 ReAlloc alloc_;
417 intptr_t vm_isolate_snapshot_size_; 419 intptr_t vm_isolate_snapshot_size_;
418 intptr_t isolate_snapshot_size_; 420 intptr_t isolate_snapshot_size_;
419 ForwardList* forward_list_; 421 ForwardList* forward_list_;
420 ImageWriter* vm_image_writer_; 422 ImageWriter* vm_image_writer_;
421 ImageWriter* isolate_image_writer_; 423 ImageWriter* isolate_image_writer_;
422 Array& token_streams_; 424 ZoneGrowableArray<Object*>* seed_objects_;
425 ZoneGrowableArray<Code*>* seed_code_;
423 Array& saved_symbol_table_; 426 Array& saved_symbol_table_;
424 Array& new_vm_symbol_table_; 427 Array& new_vm_symbol_table_;
425 428
426 // Stats for benchmarking. 429 // Stats for benchmarking.
427 intptr_t clustered_vm_size_; 430 intptr_t clustered_vm_size_;
428 intptr_t clustered_isolate_size_; 431 intptr_t clustered_isolate_size_;
429 intptr_t mapped_data_size_; 432 intptr_t mapped_data_size_;
430 intptr_t mapped_instructions_size_; 433 intptr_t mapped_instructions_size_;
431 434
432 DISALLOW_COPY_AND_ASSIGN(FullSnapshotWriter); 435 DISALLOW_COPY_AND_ASSIGN(FullSnapshotWriter);
(...skipping 16 matching lines...) Expand all
449 intptr_t size_; 452 intptr_t size_;
450 const uint8_t* instructions_buffer_; 453 const uint8_t* instructions_buffer_;
451 const uint8_t* data_buffer_; 454 const uint8_t* data_buffer_;
452 455
453 DISALLOW_COPY_AND_ASSIGN(FullSnapshotReader); 456 DISALLOW_COPY_AND_ASSIGN(FullSnapshotReader);
454 }; 457 };
455 458
456 } // namespace dart 459 } // namespace dart
457 460
458 #endif // RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ 461 #endif // RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/clustered_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698