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

Unified Diff: runtime/bin/main.cc

Issue 2200683002: Add --hot-reload-rollback test mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/isolate_reload.cc » ('j') | no next file with comments »
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 0c6b8b7d6838e758818cb0ad4be44d3199a8dc0b..a90c1a45cd78f32f45495a9c3ab5c02926505817 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -452,6 +452,26 @@ static bool ProcessHotReloadTestModeOption(const char* arg,
}
+static bool ProcessHotReloadRollbackTestModeOption(
+ const char* arg,
+ CommandLineOptions* vm_options) {
+ // Identity reload.
+ vm_options->AddArgument("--identity_reload");
+ // Start reloading quickly.
+ vm_options->AddArgument("--reload_every=4");
+ // 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 every isolate has reloaded once before exiting.
+ vm_options->AddArgument("--check_reloaded");
+ // Force all reloads to fail and execute the rollback code.
+ vm_options->AddArgument("--reload_force_rollback");
+
+ return true;
+}
+
+
static struct {
const char* option_name;
bool (*process)(const char* option, CommandLineOptions* vm_options);
@@ -477,6 +497,7 @@ static struct {
{ "--use-blobs", ProcessUseBlobsOption },
{ "--trace-loading", ProcessTraceLoadingOption },
{ "--hot-reload-test-mode", ProcessHotReloadTestModeOption },
+ { "--hot-reload-rollback-test-mode", ProcessHotReloadRollbackTestModeOption },
{ NULL, NULL }
};
« no previous file with comments | « no previous file | runtime/vm/isolate_reload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698