Add verify-at-runtime compiler filter
Verifies at runtime only, instead of at compilation time.
AOSP HH boot time after clean-oat: ~30s instead of ~35s if enabled.
Also helps install time if enabled there.
TODO: See if there is any possible deadlocks that can result from
this.
Bug: 19762303
Change-Id: Ibfba77148da9039e8d7d7497c05486bc044eefe7
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index a372179..67c96fd 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -894,6 +894,8 @@
compiler_filter = CompilerOptions::kVerifyNone;
} else if (strcmp(compiler_filter_string, "interpret-only") == 0) {
compiler_filter = CompilerOptions::kInterpretOnly;
+ } else if (strcmp(compiler_filter_string, "verify-at-runtime") == 0) {
+ compiler_filter = CompilerOptions::kVerifyAtRuntime;
} else if (strcmp(compiler_filter_string, "space") == 0) {
compiler_filter = CompilerOptions::kSpace;
} else if (strcmp(compiler_filter_string, "balanced") == 0) {