5#ifndef RUNTIME_VM_APP_SNAPSHOT_H_
6#define RUNTIME_VM_APP_SNAPSHOT_H_
38class V8SnapshotProfileWriter;
46 : id_(
id), parent_(
parent), deferred_objects_(), objects_(nullptr) {}
48 intptr_t
id()
const {
return id_; }
55 ASSERT(objects_ !=
nullptr);
59 ASSERT(objects_ ==
nullptr);
99 char* VerifyVersion();
100 char* ReadFeatures(
const char** features, intptr_t* features_length);
102 char* BuildError(
const char*
message);
123 uint32_t program_hash);
129 Thread* thread()
const {
return thread_; }
130 Zone* zone()
const {
return thread_->
zone(); }
131 IsolateGroup* isolate_group()
const {
return thread_->
isolate_group(); }
132 Heap* heap()
const {
return isolate_group()->
heap(); }
135 ZoneGrowableArray<Object*>* WriteVMSnapshot();
138 void WriteProgramSnapshot(ZoneGrowableArray<Object*>* objects,
139 GrowableArray<LoadingUnitSerializationData*>*
data);
143 NonStreamingWriteStream*
const vm_snapshot_data_;
144 NonStreamingWriteStream*
const isolate_snapshot_data_;
145 intptr_t vm_isolate_snapshot_size_;
146 intptr_t isolate_snapshot_size_;
147 ImageWriter* vm_image_writer_;
148 ImageWriter* isolate_image_writer_;
151 intptr_t clustered_vm_size_ = 0;
152 intptr_t clustered_isolate_size_ = 0;
153 intptr_t mapped_data_size_ = 0;
154 intptr_t mapped_text_size_ = 0;
155 intptr_t heap_vm_size_ = 0;
156 intptr_t heap_isolate_size_ = 0;
158 V8SnapshotProfileWriter* profile_writer_ =
nullptr;
166 const uint8_t* instructions_buffer,
177 ApiErrorPtr ConvertToApiError(
char*
message);
178 void InitializeBSS();
182 const uint8_t* buffer_;
184 const uint8_t* data_image_;
185 const uint8_t* instructions_image_;
ApiErrorPtr ReadUnitSnapshot(const LoadingUnit &unit)
ApiErrorPtr ReadProgramSnapshot()
FullSnapshotReader(const Snapshot *snapshot, const uint8_t *instructions_buffer, Thread *thread)
ApiErrorPtr ReadVMSnapshot()
FullSnapshotWriter(Snapshot::Kind kind, NonStreamingWriteStream *vm_snapshot_data, NonStreamingWriteStream *isolate_snapshot_data, ImageWriter *vm_image_writer, ImageWriter *iso_image_writer)
intptr_t VmIsolateSnapshotSize() const
void WriteFullSnapshot(GrowableArray< LoadingUnitSerializationData * > *data=nullptr)
intptr_t IsolateSnapshotSize() const
void WriteUnitSnapshot(GrowableArray< LoadingUnitSerializationData * > *units, LoadingUnitSerializationData *unit, uint32_t program_hash)
static constexpr intptr_t kInitialSize
void set_objects(ZoneGrowableArray< Object * > *objects)
ZoneGrowableArray< Object * > * objects()
LoadingUnitSerializationData * parent() const
void AddDeferredObject(CodePtr obj)
GrowableArray< Code * > * deferred_objects()
LoadingUnitSerializationData(intptr_t id, LoadingUnitSerializationData *parent)
static Object & ZoneHandle()
void SetPosition(intptr_t value)
static constexpr intptr_t kHeaderSize
IsolateGroup * isolate_group() const
const uint8_t * isolate_snapshot_data
const uint8_t * vm_snapshot_data
static int8_t data[kExtLength]
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size