diff options
author | 2023-11-03 15:42:11 +0000 | |
---|---|---|
committer | 2023-11-06 14:37:04 +0000 | |
commit | 4fd854d795a8d6d1572db8529945af3fe182ee4e (patch) | |
tree | 2ce2759d6a5ac41bb1e427cfb60327c953310665 | |
parent | f987c5cf9c8be959fc1ab62cb0e1c29222cc9fc3 (diff) |
Deprecate num-dex-methods and top-k-profile-threshold flags
They were unused and did nothing.
Test: Presubmit
Change-Id: Id651d5834afcdf293939b79d330b198aef0c954c
-rw-r--r-- | compiler/driver/compiler_options.cc | 2 | ||||
-rw-r--r-- | compiler/driver/compiler_options.h | 14 | ||||
-rw-r--r-- | compiler/driver/compiler_options_map-inl.h | 19 | ||||
-rw-r--r-- | compiler/driver/compiler_options_map.def | 2 |
4 files changed, 6 insertions, 31 deletions
diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc index e1245c7121..1ff7b1f55f 100644 --- a/compiler/driver/compiler_options.cc +++ b/compiler/driver/compiler_options.cc @@ -41,7 +41,6 @@ CompilerOptions::CompilerOptions() : compiler_filter_(CompilerFilter::kDefaultCompilerFilter), huge_method_threshold_(kDefaultHugeMethodThreshold), large_method_threshold_(kDefaultLargeMethodThreshold), - num_dex_methods_threshold_(kDefaultNumDexMethodsThreshold), inline_max_code_units_(kUnsetInlineMaxCodeUnits), instruction_set_(kRuntimeISA == InstructionSet::kArm ? InstructionSet::kThumb2 : kRuntimeISA), instruction_set_features_(nullptr), @@ -65,7 +64,6 @@ CompilerOptions::CompilerOptions() dump_timings_(false), dump_pass_timings_(false), dump_stats_(false), - top_k_profile_threshold_(kDefaultTopKProfileThreshold), profile_compilation_info_(nullptr), verbose_methods_(), abort_on_hard_verifier_failure_(false), diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index 7369b61b8b..f816c1485d 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -63,8 +63,6 @@ class CompilerOptions final { // Guide heuristics to determine whether to compile method if profile data not available. static const size_t kDefaultHugeMethodThreshold = 10000; static const size_t kDefaultLargeMethodThreshold = 600; - static const size_t kDefaultNumDexMethodsThreshold = 900; - static constexpr double kDefaultTopKProfileThreshold = 90.0; static const bool kDefaultGenerateDebugInfo = false; static const bool kDefaultGenerateMiniDebugInfo = true; static const size_t kDefaultInlineMaxCodeUnits = 32; @@ -135,10 +133,6 @@ class CompilerOptions final { return num_dalvik_instructions > large_method_threshold_; } - size_t GetNumDexMethodsThreshold() const { - return num_dex_methods_threshold_; - } - size_t GetInlineMaxCodeUnits() const { return inline_max_code_units_; } @@ -146,10 +140,6 @@ class CompilerOptions final { inline_max_code_units_ = units; } - double GetTopKProfileThreshold() const { - return top_k_profile_threshold_; - } - bool EmitReadBarrier() const { return emit_read_barrier_; } @@ -399,7 +389,6 @@ class CompilerOptions final { CompilerFilter::Filter compiler_filter_; size_t huge_method_threshold_; size_t large_method_threshold_; - size_t num_dex_methods_threshold_; size_t inline_max_code_units_; InstructionSet instruction_set_; @@ -439,9 +428,6 @@ class CompilerOptions final { bool dump_pass_timings_; bool dump_stats_; - // When using a profile file only the top K% of the profiled samples will be compiled. - double top_k_profile_threshold_; - // Info for profile guided compilation. const ProfileCompilationInfo* profile_compilation_info_; diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h index 8530df37e4..4734950a2c 100644 --- a/compiler/driver/compiler_options_map-inl.h +++ b/compiler/driver/compiler_options_map-inl.h @@ -58,7 +58,6 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string map.AssignIfExists(Base::CompileArtTest, &options->compile_art_test_); map.AssignIfExists(Base::HugeMethodMaxThreshold, &options->huge_method_threshold_); map.AssignIfExists(Base::LargeMethodMaxThreshold, &options->large_method_threshold_); - map.AssignIfExists(Base::NumDexMethodsThreshold, &options->num_dex_methods_threshold_); map.AssignIfExists(Base::InlineMaxCodeUnitsThreshold, &options->inline_max_code_units_); map.AssignIfExists(Base::GenerateDebugInfo, &options->generate_debug_info_); map.AssignIfExists(Base::GenerateMiniDebugInfo, &options->generate_mini_debug_info_); @@ -69,7 +68,6 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string if (map.Exists(Base::Baseline)) { options->baseline_ = true; } - map.AssignIfExists(Base::TopKProfileThreshold, &options->top_k_profile_threshold_); map.AssignIfExists(Base::AbortOnHardVerifierFailure, &options->abort_on_hard_verifier_failure_); map.AssignIfExists(Base::AbortOnSoftVerifierFailure, &options->abort_on_soft_verifier_failure_); if (map.Exists(Base::DumpInitFailures)) { @@ -137,12 +135,6 @@ NO_INLINE void AddCompilerOptionsArgumentParserOptions(Builder& b) { .template WithType<unsigned int>() .WithHelp("threshold size for a large method for compiler filter tuning.") .IntoKey(Map::LargeMethodMaxThreshold) - .Define("--num-dex-methods=_") - .template WithType<unsigned int>() - .WithHelp("threshold size for a small dex file for compiler filter tuning. If the input\n" - "has fewer than this many methods and the filter is not interpret-only or\n" - "verify-none or verify-at-runtime, overrides the filter to use speed") - .IntoKey(Map::NumDexMethodsThreshold) .Define("--inline-max-code-units=_") .template WithType<unsigned int>() .WithHelp("the maximum code units that a methodcan have to be considered for inlining.\n" @@ -206,10 +198,6 @@ NO_INLINE void AddCompilerOptionsArgumentParserOptions(Builder& b) { .WithHelp("Produce code using the baseline compilation") .IntoKey(Map::Baseline) - .Define("--top-k-profile-threshold=_") - .template WithType<double>().WithRange(0.0, 100.0) - .IntoKey(Map::TopKProfileThreshold) - .Define({"--abort-on-hard-verifier-error", "--no-abort-on-hard-verifier-error"}) .WithValues({true, false}) .IntoKey(Map::AbortOnHardVerifierFailure) @@ -256,7 +244,12 @@ NO_INLINE void AddCompilerOptionsArgumentParserOptions(Builder& b) { .Define("--max-image-block-size=_") .template WithType<unsigned int>() .WithHelp("Maximum solid block size for compressed images.") - .IntoKey(Map::MaxImageBlockSize); + .IntoKey(Map::MaxImageBlockSize) + // Obsolete flags + .Ignore({ + "--num-dex-methods=_", + "--top-k-profile-threshold=_", + }); // clang-format on } diff --git a/compiler/driver/compiler_options_map.def b/compiler/driver/compiler_options_map.def index b1398c9a33..c6666a8085 100644 --- a/compiler/driver/compiler_options_map.def +++ b/compiler/driver/compiler_options_map.def @@ -41,14 +41,12 @@ COMPILER_OPTIONS_KEY (bool, CompileArtTest) COMPILER_OPTIONS_KEY (Unit, PIC) COMPILER_OPTIONS_KEY (unsigned int, HugeMethodMaxThreshold) COMPILER_OPTIONS_KEY (unsigned int, LargeMethodMaxThreshold) -COMPILER_OPTIONS_KEY (unsigned int, NumDexMethodsThreshold) COMPILER_OPTIONS_KEY (unsigned int, InlineMaxCodeUnitsThreshold) COMPILER_OPTIONS_KEY (bool, GenerateDebugInfo) COMPILER_OPTIONS_KEY (bool, GenerateMiniDebugInfo) COMPILER_OPTIONS_KEY (bool, GenerateBuildID) COMPILER_OPTIONS_KEY (Unit, Debuggable) COMPILER_OPTIONS_KEY (Unit, Baseline) -COMPILER_OPTIONS_KEY (double, TopKProfileThreshold) COMPILER_OPTIONS_KEY (bool, AbortOnHardVerifierFailure) COMPILER_OPTIONS_KEY (bool, AbortOnSoftVerifierFailure) COMPILER_OPTIONS_KEY (bool, ResolveStartupConstStrings, false) |