summaryrefslogtreecommitdiffstats
path: root/dex2oat
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2014-04-01 14:58:49 -0700
committerJeff Hao <jeffhao@google.com>2014-04-02 17:18:13 -0700
commit4a200f56b7075309316b04d550c9cc50f8314edd (patch)
tree0c01f484239203eeeb9f8e5f97300bca09b051ad /dex2oat
parentd0ab1223cc8c5181e502196a7765790ad2aba3c8 (diff)
downloadart-4a200f56b7075309316b04d550c9cc50f8314edd.zip
art-4a200f56b7075309316b04d550c9cc50f8314edd.tar.gz
art-4a200f56b7075309316b04d550c9cc50f8314edd.tar.bz2
Add support for -Xverify:none mode.
This mode skips all verification and compilation. Public bug: https://code.google.com/p/android/issues/detail?id=67664 Change-Id: Idd00ab8e9e46d129c02988b063c41a507e07bf5b
Diffstat (limited to 'dex2oat')
-rw-r--r--dex2oat/dex2oat.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 552ec89..f665f5c 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -153,8 +153,8 @@ static void Usage(const char* fmt, ...) {
UsageError(" Example: --compiler-backend=Portable");
UsageError(" Default: Quick");
UsageError("");
- UsageError(" --compiler-filter=(interpret-only|space|balanced|speed|everything): select");
- UsageError(" compiler filter.");
+ UsageError(" --compiler-filter=(verify-none|interpret-only|space|balanced|speed|everything):");
+ UsageError(" select compiler filter.");
UsageError(" Example: --compiler-filter=everything");
#if ART_SMALL_MODE
UsageError(" Default: interpret-only");
@@ -189,7 +189,8 @@ static void Usage(const char* fmt, ...) {
UsageError("");
UsageError(" --num-dex-methods=<method-count>: threshold size for a small dex file for");
UsageError(" compiler filter tuning. If the input has fewer than this many methods");
- UsageError(" and the filter is not interpret-only, overrides the filter to use speed");
+ UsageError(" and the filter is not interpret-only or verify-none, overrides the");
+ UsageError(" filter to use speed");
UsageError(" Example: --num-dex-method=%d", CompilerOptions::kDefaultNumDexMethodsThreshold);
UsageError(" Default: %d", CompilerOptions::kDefaultNumDexMethodsThreshold);
UsageError("");
@@ -201,8 +202,8 @@ static void Usage(const char* fmt, ...) {
UsageError(" such as initial heap size, maximum heap size, and verbose output.");
UsageError(" Use a separate --runtime-arg switch for each argument.");
UsageError(" Example: --runtime-arg -Xms256m");
- UsageError("");
- UsageError(" --profile-file=<filename>: specify profiler output file to use for compilation.");
+ UsageError("");
+ UsageError(" --profile-file=<filename>: specify profiler output file to use for compilation.");
UsageError("");
UsageError(" --print-pass-names: print a list of pass names");
UsageError("");
@@ -1037,7 +1038,9 @@ static int dex2oat(int argc, char** argv) {
}
CHECK(compiler_filter_string != nullptr);
CompilerOptions::CompilerFilter compiler_filter = CompilerOptions::kDefaultCompilerFilter;
- if (strcmp(compiler_filter_string, "interpret-only") == 0) {
+ if (strcmp(compiler_filter_string, "verify-none") == 0) {
+ compiler_filter = CompilerOptions::kVerifyNone;
+ } else if (strcmp(compiler_filter_string, "interpret-only") == 0) {
compiler_filter = CompilerOptions::kInterpretOnly;
} else if (strcmp(compiler_filter_string, "space") == 0) {
compiler_filter = CompilerOptions::kSpace;
@@ -1208,10 +1211,10 @@ static int dex2oat(int argc, char** argv) {
}
/*
- * If we're not in interpret-only mode, go ahead and compile small applications. Don't
- * bother to check if we're doing the image.
+ * If we're not in interpret-only or verify-none mode, go ahead and compile small applications.
+ * Don't bother to check if we're doing the image.
*/
- if (!image && (compiler_options.GetCompilerFilter() != CompilerOptions::kInterpretOnly)) {
+ if (!image && compiler_options.IsCompilationEnabled()) {
size_t num_methods = 0;
for (size_t i = 0; i != dex_files.size(); ++i) {
const DexFile* dex_file = dex_files[i];