diff options
author | Andreas Gampe <agampe@google.com> | 2016-03-23 15:31:51 +0000 |
---|---|---|
committer | Richard Uhler <ruhler@google.com> | 2016-03-23 11:30:29 -0700 |
commit | 29d38e77c553c6cf71fc4dafe2d22b4e3f814872 (patch) | |
tree | 92f34f589af205af56189d221ded293234935c26 /compiler/driver/compiler_options.cc | |
parent | 2e89e901b9f303549f3ba64e45d87292e9c986c8 (diff) |
Revert "Revert "Use compiler filter to determine oat file status.""
This reverts commit 845e5064580bd37ad5014f7aa0d078be7265464d.
Add an option to change what OatFileManager considers up-to-date.
In our tests we're allowed to write to the dalvik-cache, so it
cannot be kSpeed.
Bug: 27689078
Change-Id: I0c578705a9921114ed1fb00d360cc7448addc93a
Diffstat (limited to 'compiler/driver/compiler_options.cc')
-rw-r--r-- | compiler/driver/compiler_options.cc | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc index f5969aa825..1bd4c3ad80 100644 --- a/compiler/driver/compiler_options.cc +++ b/compiler/driver/compiler_options.cc @@ -52,7 +52,7 @@ CompilerOptions::~CompilerOptions() { // because we don't want to include the PassManagerOptions definition from the header file. } -CompilerOptions::CompilerOptions(CompilerFilter compiler_filter, +CompilerOptions::CompilerOptions(CompilerFilter::Filter compiler_filter, size_t huge_method_threshold, size_t large_method_threshold, size_t small_method_threshold, @@ -147,25 +147,7 @@ void CompilerOptions::ParseDumpInitFailures(const StringPiece& option, bool CompilerOptions::ParseCompilerOption(const StringPiece& option, UsageFn Usage) { if (option.starts_with("--compiler-filter=")) { const char* compiler_filter_string = option.substr(strlen("--compiler-filter=")).data(); - 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, "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) { - compiler_filter_ = CompilerOptions::kBalanced; - } else if (strcmp(compiler_filter_string, "speed") == 0) { - compiler_filter_ = CompilerOptions::kSpeed; - } else if (strcmp(compiler_filter_string, "everything") == 0) { - compiler_filter_ = CompilerOptions::kEverything; - } else if (strcmp(compiler_filter_string, "time") == 0) { - compiler_filter_ = CompilerOptions::kTime; - } else if (strcmp(compiler_filter_string, "verify-profile") == 0) { - compiler_filter_ = CompilerOptions::kVerifyProfile; - } else { + if (!CompilerFilter::ParseCompilerFilter(compiler_filter_string, &compiler_filter_)) { Usage("Unknown --compiler-filter value %s", compiler_filter_string); } } else if (option == "--compile-pic") { |