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.h | |
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.h')
-rw-r--r-- | compiler/driver/compiler_options.h | 42 |
1 files changed, 11 insertions, 31 deletions
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index 11a4e06313..c67ab6ef14 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -22,6 +22,7 @@ #include <vector> #include "base/macros.h" +#include "compiler_filter.h" #include "globals.h" #include "utils.h" @@ -29,20 +30,8 @@ namespace art { class CompilerOptions FINAL { public: - enum CompilerFilter { - kVerifyNone, // Skip verification and compile nothing except JNI stubs. - kInterpretOnly, // Verify, and compile only JNI stubs. - kVerifyAtRuntime, // Only compile JNI stubs and verify at runtime. - kSpace, // Maximize space savings. - kBalanced, // Try to get the best performance return on compilation investment. - kSpeed, // Maximize runtime performance. - kEverything, // Force compilation of everything capable of being compiled. - kTime, // Compile methods, but minimize compilation time. - kVerifyProfile, // Verify only the classes in the profile. - }; - // Guide heuristics to determine whether to compile method if profile data not available. - static const CompilerFilter kDefaultCompilerFilter = kSpeed; + static const CompilerFilter::Filter kDefaultCompilerFilter = CompilerFilter::kSpeed; static const size_t kDefaultHugeMethodThreshold = 10000; static const size_t kDefaultLargeMethodThreshold = 600; static const size_t kDefaultSmallMethodThreshold = 60; @@ -64,7 +53,7 @@ class CompilerOptions FINAL { CompilerOptions(); ~CompilerOptions(); - CompilerOptions(CompilerFilter compiler_filter, + CompilerOptions(CompilerFilter::Filter compiler_filter, size_t huge_method_threshold, size_t large_method_threshold, size_t small_method_threshold, @@ -88,40 +77,32 @@ class CompilerOptions FINAL { bool dump_cfg_append, bool force_determinism); - CompilerFilter GetCompilerFilter() const { + CompilerFilter::Filter GetCompilerFilter() const { return compiler_filter_; } - void SetCompilerFilter(CompilerFilter compiler_filter) { + void SetCompilerFilter(CompilerFilter::Filter compiler_filter) { compiler_filter_ = compiler_filter; } bool VerifyAtRuntime() const { - return compiler_filter_ == CompilerOptions::kVerifyAtRuntime; + return compiler_filter_ == CompilerFilter::kVerifyAtRuntime; } bool IsCompilationEnabled() const { - return compiler_filter_ != CompilerOptions::kVerifyNone && - compiler_filter_ != CompilerOptions::kInterpretOnly && - compiler_filter_ != CompilerOptions::kVerifyAtRuntime && - compiler_filter_ != CompilerOptions::kVerifyProfile; + return CompilerFilter::IsCompilationEnabled(compiler_filter_); } bool IsVerificationEnabled() const { - return compiler_filter_ != CompilerOptions::kVerifyNone && - compiler_filter_ != CompilerOptions::kVerifyAtRuntime; + return CompilerFilter::IsVerificationEnabled(compiler_filter_); } bool NeverVerify() const { - return compiler_filter_ == CompilerOptions::kVerifyNone; - } - - bool IsExtractOnly() const { - return compiler_filter_ == CompilerOptions::kVerifyAtRuntime; + return compiler_filter_ == CompilerFilter::kVerifyNone; } bool VerifyOnlyProfile() const { - return compiler_filter_ == CompilerOptions::kVerifyProfile; + return compiler_filter_ == CompilerFilter::kVerifyProfile; } size_t GetHugeMethodThreshold() const { @@ -271,7 +252,7 @@ class CompilerOptions FINAL { void ParseLargeMethodMax(const StringPiece& option, UsageFn Usage); void ParseHugeMethodMax(const StringPiece& option, UsageFn Usage); - CompilerFilter compiler_filter_; + CompilerFilter::Filter compiler_filter_; size_t huge_method_threshold_; size_t large_method_threshold_; size_t small_method_threshold_; @@ -317,7 +298,6 @@ class CompilerOptions FINAL { DISALLOW_COPY_AND_ASSIGN(CompilerOptions); }; -std::ostream& operator<<(std::ostream& os, const CompilerOptions::CompilerFilter& rhs); } // namespace art |