5#ifndef RUNTIME_VM_DART_H_
6#define RUNTIME_VM_DART_H_
51 const uint8_t* snapshot_data,
52 const uint8_t* snapshot_instructions,
53 const uint8_t* kernel_buffer,
54 intptr_t kernel_buffer_size);
57 const uint8_t* snapshot_data,
58 const uint8_t* snapshot_instructions,
59 const uint8_t* kernel_buffer,
60 intptr_t kernel_buffer_size);
62 bool is_first_isolate_in_group,
70 if (vm_isolate_ ==
nullptr)
return nullptr;
71 return vm_isolate_->
group();
81 pprof_symbol_generator_ =
value;
98 return thread_start_callback_;
101 thread_start_callback_ = cback;
104 return thread_exit_callback_;
107 thread_exit_callback_ = cback;
113 file_open_callback_ = file_open;
114 file_read_callback_ = file_read;
115 file_write_callback_ = file_write;
116 file_close_callback_ = file_close;
120 return file_open_callback_;
123 return file_read_callback_;
126 return file_write_callback_;
129 return file_close_callback_;
133 entropy_source_callback_ = entropy_source;
136 return entropy_source_callback_;
141 dwarf_stacktrace_footnote_callback_ = cb;
146 return dwarf_stacktrace_footnote_callback_;
152 static constexpr const char* kVmIsolateName =
"vm-isolate";
154 static void WaitForIsolateShutdown();
155 static void WaitForApplicationIsolateShutdown();
158 static int64_t start_time_micros_;
160 static DebugInfo* pprof_symbol_generator_;
171 dwarf_stacktrace_footnote_callback_;
static ErrorPtr InitializeIsolateGroup(Thread *T, const uint8_t *snapshot_data, const uint8_t *snapshot_instructions, const uint8_t *kernel_buffer, intptr_t kernel_buffer_size)
static ThreadPool * thread_pool()
static bool IsReadOnlyHandle(uword address)
static Dart_FileWriteCallback file_write_callback()
static void set_thread_start_callback(Dart_ThreadStartCallback cback)
static Dart_FileReadCallback file_read_callback()
static bool IsInitialized()
static void ShutdownIsolate(Thread *T)
static IsolateGroup * vm_isolate_group()
static Dart_FileOpenCallback file_open_callback()
static Dart_EntropySource entropy_source_callback()
static void set_entropy_source_callback(Dart_EntropySource entropy_source)
static bool SetActiveApiCall()
static int64_t UptimeMillis()
static Dart_DwarfStackTraceFootnoteCallback dwarf_stacktrace_footnote_callback()
static DebugInfo * pprof_symbol_generator()
static Dart_ThreadStartCallback thread_start_callback()
static Isolate * vm_isolate()
static char * Init(const Dart_InitializeParams *params)
static void SetFileCallbacks(Dart_FileOpenCallback file_open, Dart_FileReadCallback file_read, Dart_FileWriteCallback file_write, Dart_FileCloseCallback file_close)
static int64_t UptimeMicros()
static Dart_ThreadExitCallback thread_exit_callback()
static char * FeaturesString(IsolateGroup *isolate_group, bool is_vm_snapshot, Snapshot::Kind kind)
static Isolate * CreateIsolate(const char *name_prefix, const Dart_IsolateFlags &api_flags, IsolateGroup *isolate_group)
static bool IsReadOnlyApiHandle(Dart_Handle handle)
static uword AllocateReadOnlyHandle()
static void ResetActiveApiCall()
static Snapshot::Kind vm_snapshot_kind()
static void RunShutdownCallback()
static LocalHandle * AllocateReadOnlyApiHandle()
static ErrorPtr InitializeIsolate(Thread *T, bool is_first_isolate_in_group, void *isolate_data)
static void set_thread_exit_callback(Dart_ThreadExitCallback cback)
static Dart_FileCloseCallback file_close_callback()
static void set_pprof_symbol_generator(DebugInfo *value)
static ErrorPtr InitIsolateGroupFromSnapshot(Thread *T, const uint8_t *snapshot_data, const uint8_t *snapshot_instructions, const uint8_t *kernel_buffer, intptr_t kernel_buffer_size)
static void set_dwarf_stacktrace_footnote_callback(Dart_DwarfStackTraceFootnoteCallback cb)
IsolateGroup * group() const
void(* Dart_FileWriteCallback)(const void *data, intptr_t length, void *stream)
void(* Dart_FileCloseCallback)(void *stream)
void(* Dart_FileReadCallback)(uint8_t **data, intptr_t *file_length, void *stream)
struct _Dart_Handle * Dart_Handle
bool(* Dart_EntropySource)(uint8_t *buffer, intptr_t length)
void(* Dart_ThreadStartCallback)(void)
void *(* Dart_FileOpenCallback)(const char *name, bool write)
void(* Dart_ThreadExitCallback)(void)
char *(* Dart_DwarfStackTraceFootnoteCallback)(void *addresses[], intptr_t count)
const EmbeddedViewParams * params
constexpr intptr_t kMicrosecondsPerMillisecond