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

Unified Diff: runtime/vm/isolate.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/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 9974225170d53be8f2e191c2bc38b73505189ee7..73193f87f332641efb3dd727fadffed8c933d307 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1017,11 +1017,29 @@ void Isolate::SetupInstructionsSnapshotPage(
snapshot.instructions_size());
}
#endif
- heap_->SetupInstructionsSnapshotPage(snapshot.instructions_start(),
- snapshot.instructions_size());
+ heap_->SetupExternalPage(snapshot.instructions_start(),
+ snapshot.instructions_size(),
+ /* is_executable = */ true);
}
+void Isolate::SetupDataSnapshotPage(const uint8_t* data_snapshot_buffer) {
+ DataSnapshot snapshot(data_snapshot_buffer);
+#if defined(DEBUG)
+ if (FLAG_trace_isolates) {
+ OS::Print("Precompiled rodata are at [0x%" Px ", 0x%" Px ")\n",
+ reinterpret_cast<uword>(snapshot.data_start()),
+ reinterpret_cast<uword>(snapshot.data_start()) +
+ snapshot.data_size());
+ }
+#endif
+ heap_->SetupExternalPage(snapshot.data_start(),
+ snapshot.data_size(),
+ /* is_executable = */ false);
+}
+
+
+
void Isolate::set_debugger_name(const char* name) {
free(debugger_name_);
debugger_name_ = strdup(name);
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/object.cc » ('j') | runtime/vm/raw_object_snapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698