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

Unified Diff: runtime/bin/main.cc

Issue 1584443002: VM: Precompiled rodata snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: added read-only page type Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 6be11f0cc2cb8bf01044760242a257486fd10e48..5f7f72dd3355481ae359c63c06be3a6ddaeb8e21 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -99,7 +99,8 @@ static const bool is_noopt = false;
extern const char* kPrecompiledLibraryName;
-extern const char* kPrecompiledSymbolName;
+extern const char* kPrecompiledInstructionsSymbolName;
+extern const char* kPrecompiledDataSymbolName;
static const char* kPrecompiledVmIsolateName = "precompiled.vmisolate";
static const char* kPrecompiledIsolateName = "precompiled.isolate";
static const char* kPrecompiledInstructionsName = "precompiled.S";
@@ -1553,15 +1554,21 @@ void main(int argc, char** argv) {
EventHandler::Start();
const uint8_t* instructions_snapshot = NULL;
+ const uint8_t* data_snapshot = NULL;
if (run_precompiled_snapshot) {
instructions_snapshot = reinterpret_cast<const uint8_t*>(
- LoadLibrarySymbol(kPrecompiledLibraryName, kPrecompiledSymbolName));
+ LoadLibrarySymbol(kPrecompiledLibraryName,
+ kPrecompiledInstructionsSymbolName));
+ data_snapshot = reinterpret_cast<const uint8_t*>(
+ LoadLibrarySymbol(kPrecompiledLibraryName,
+ kPrecompiledDataSymbolName));
ReadSnapshotFile(precompiled_snapshot_directory,
kPrecompiledVmIsolateName,
&vm_isolate_snapshot_buffer);
ReadSnapshotFile(precompiled_snapshot_directory,
kPrecompiledIsolateName,
&isolate_snapshot_buffer);
+
} else if (run_full_snapshot) {
char* vm_snapshot_fname;
char* isolate_snapshot_fname;
@@ -1579,7 +1586,7 @@ void main(int argc, char** argv) {
// Initialize the Dart VM.
char* error = Dart_Initialize(
- vm_isolate_snapshot_buffer, instructions_snapshot,
+ vm_isolate_snapshot_buffer, instructions_snapshot, data_snapshot,
CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate,
DartUtils::OpenFile,
DartUtils::ReadFile,

Powered by Google App Engine
This is Rietveld 408576698