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

Unified Diff: runtime/bin/main.cc

Issue 2118923002: Add --hot-reload-test-mode flag to embedder and wire it up to test.py (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | runtime/vm/isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index b8b87f89ab42683b13eb1611c176d2b3612c6a0a..55776fcb10173ca494566c929a7d4de74ad0a2d6 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -425,6 +425,26 @@ static bool ProcessTraceLoadingOption(const char* arg,
}
+static bool ProcessHotReloadTestModeOption(const char* arg,
+ CommandLineOptions* vm_options) {
+ if (*arg != '\0') {
+ return false;
+ }
+
+ // Identity reload.
+ vm_options->AddArgument("--identity_reload");
+ // Start reloading quickly.
+ vm_options->AddArgument("--reload_every=500");
+ // Reload from optimized and unoptimized code.
+ vm_options->AddArgument("--reload_every_optimized=false");
+ // Reload less frequently as time goes on.
+ vm_options->AddArgument("--reload_every_back_off");
+ // Ensure that an isolate has reloaded once.
+ vm_options->AddArgument("--check_reloaded");
+
+ return true;
+}
+
static bool ProcessShutdownOption(const char* arg,
CommandLineOptions* vm_options) {
@@ -477,6 +497,7 @@ static struct {
{ "--run-app-snapshot=", ProcessRunAppSnapshotOption },
{ "--use-blobs", ProcessUseBlobsOption },
{ "--trace-loading", ProcessTraceLoadingOption },
+ { "--hot-reload-test-mode", ProcessHotReloadTestModeOption },
{ NULL, NULL }
};
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | runtime/vm/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698