Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::snapshot_analyzer::SnapshotAnalyzer Class Reference

Public Member Functions

 SnapshotAnalyzer (const Dart_SnapshotAnalyzerInformation &info)
 
void DumpSnapshotInformation (char **buffer, intptr_t *buffer_length)
 

Detailed Description

Definition at line 50 of file analyze_snapshot_api_impl.cc.

Constructor & Destructor Documentation

◆ SnapshotAnalyzer()

dart::snapshot_analyzer::SnapshotAnalyzer::SnapshotAnalyzer ( const Dart_SnapshotAnalyzerInformation info)
inlineexplicit

Definition at line 52 of file analyze_snapshot_api_impl.cc.

53 : info_(info) {}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213

Member Function Documentation

◆ DumpSnapshotInformation()

void dart::snapshot_analyzer::SnapshotAnalyzer::DumpSnapshotInformation ( char **  buffer,
intptr_t *  buffer_length 
)

Definition at line 359 of file analyze_snapshot_api_impl.cc.

360 {
361 thread_ = Thread::Current();
362 heap_ = thread_->isolate_group()->heap();
363 DARTSCOPE(thread_);
364
365 // Open empty object so output is valid/parsable JSON.
366 js_.OpenObject();
367 js_.OpenObject("snapshot_data");
368 // Base addresses of the snapshot data, useful to calculate relative offsets.
369 js_.PrintfProperty("vm_data", "%p", info_.vm_snapshot_data);
370 js_.PrintfProperty("vm_instructions", "%p", info_.vm_snapshot_instructions);
371 js_.PrintfProperty("isolate_data", "%p", info_.vm_isolate_data);
372 js_.PrintfProperty("isolate_instructions", "%p",
374 js_.CloseObject();
375
376 {
377 // Debug builds assert that our thread has a lock before accessing
378 // vm internal fields.
379 SafepointReadRwLocker ml(thread_, thread_->isolate_group()->program_lock());
380 DumpInterestingObjects();
381 DumpMetadata();
382 }
383
384 // Close our empty object.
385 js_.CloseObject();
386
387 // Give ownership to caller.
388 js_.Steal(buffer, buffer_length);
389}
Heap * heap() const
Definition: isolate.h:296
SafepointRwLock * program_lock()
Definition: isolate.h:537
void Steal(char **buffer, intptr_t *buffer_length)
Definition: json_writer.cc:300
void PrintfProperty(const char *name, const char *format,...) PRINTF_ATTRIBUTE(3
Definition: json_writer.cc:269
void OpenObject(const char *property_name=nullptr)
Definition: json_writer.cc:89
static Thread * Current()
Definition: thread.h:362
IsolateGroup * isolate_group() const
Definition: thread.h:541
#define DARTSCOPE(thread)
Definition: dart_api_impl.h:77
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
Definition: switches.h:126

The documentation for this class was generated from the following file: