diff options
author | Jiakai Zhang <jiakaiz@google.com> | 2023-11-20 16:24:50 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-01 17:48:00 +0000 |
commit | 1a253614a977a555f66d3ecc5b12605a1f1ce71b (patch) | |
tree | 01c85cf7639228485123b58c8526d1fb8380b233 | |
parent | f2b903265dac6e3f644887c7151bd4515ed6cfd3 (diff) | |
download | art-1a253614a977a555f66d3ecc5b12605a1f1ce71b.tar.gz |
Revert "profman: Change the default new min methods/classes percent change"
This reverts commit 02f1b03d3c764dadf14ac4c6c8bca0dee6554eb8.
Reason for revert: b/242170869
Bug: 242170869
Test: Presubmit
(cherry picked from https://android-review.googlesource.com/q/commit:a35b38f23fb0e1057c38d63eccc6c4c2c6331e0e)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6ab2b677d44b9022242a50ab6851d564e98d60d6)
Merged-In: Ic40f64c4e626610d3d03b95c79a20d151371b1ff
Change-Id: Ic40f64c4e626610d3d03b95c79a20d151371b1ff
-rw-r--r-- | profman/profile_assistant.h | 4 | ||||
-rw-r--r-- | profman/profile_assistant_test.cc | 20 | ||||
-rw-r--r-- | profman/profman.cc | 4 |
3 files changed, 4 insertions, 24 deletions
diff --git a/profman/profile_assistant.h b/profman/profile_assistant.h index 6b7a7a67f5..84f140f23e 100644 --- a/profman/profile_assistant.h +++ b/profman/profile_assistant.h @@ -32,8 +32,8 @@ class ProfileAssistant { public: static constexpr bool kForceMergeDefault = false; static constexpr bool kBootImageMergeDefault = false; - static constexpr uint32_t kMinNewMethodsPercentChangeForCompilation = 20; - static constexpr uint32_t kMinNewClassesPercentChangeForCompilation = 20; + static constexpr uint32_t kMinNewMethodsPercentChangeForCompilation = 2; + static constexpr uint32_t kMinNewClassesPercentChangeForCompilation = 2; Options() : force_merge_(kForceMergeDefault), diff --git a/profman/profile_assistant_test.cc b/profman/profile_assistant_test.cc index f7c4255071..d06571ef0d 100644 --- a/profman/profile_assistant_test.cc +++ b/profman/profile_assistant_test.cc @@ -684,16 +684,6 @@ TEST_F(ProfileAssistantTest, ShouldAdviseCompilationMethodPercentage) { kNumberOfMethodsInCurProfile, kNumberOfMethodsInRefProfile, extra_args)); } -TEST_F(ProfileAssistantTest, DoNotAdviseCompilationMethodPercentageWithNewMin) { - const uint16_t kNumberOfMethodsInRefProfile = 6000; - const uint16_t kNumberOfMethodsInCurProfile = 6200; // Threshold is 20%. - - // We should not advise compilation. - ASSERT_EQ(ProfmanResult::kSkipCompilationSmallDelta, - CheckCompilationMethodPercentChange(kNumberOfMethodsInCurProfile, - kNumberOfMethodsInRefProfile)); -} - TEST_F(ProfileAssistantTest, DoNotAdviseCompilationClassPercentage) { const uint16_t kNumberOfClassesInRefProfile = 6000; const uint16_t kNumberOfClassesInCurProfile = 6110; // Threshold is 2%. @@ -716,16 +706,6 @@ TEST_F(ProfileAssistantTest, ShouldAdviseCompilationClassPercentage) { kNumberOfClassesInCurProfile, kNumberOfClassesInRefProfile, extra_args)); } -TEST_F(ProfileAssistantTest, DoNotAdviseCompilationClassPercentageWithNewMin) { - const uint16_t kNumberOfClassesInRefProfile = 6000; - const uint16_t kNumberOfClassesInCurProfile = 6200; // Threshold is 20%. - - // We should not advise compilation. - ASSERT_EQ(ProfmanResult::kSkipCompilationSmallDelta, - CheckCompilationClassPercentChange(kNumberOfClassesInCurProfile, - kNumberOfClassesInRefProfile)); -} - TEST_F(ProfileAssistantTest, FailProcessingBecauseOfProfiles) { ScratchFile profile1; ScratchFile profile2; diff --git a/profman/profman.cc b/profman/profman.cc index 375a489821..3ce5d699b4 100644 --- a/profman/profman.cc +++ b/profman/profman.cc @@ -191,9 +191,9 @@ NO_RETURN static void Usage(const char *fmt, ...) { UsageError(" In this case, the reference profile must have a boot profile version."); UsageError(" --force-merge: performs a forced merge, without analyzing if there is a"); UsageError(" significant difference between the current profile and the reference profile."); - UsageError(" --min-new-methods-percent-change=percentage between 0 and 100 (default 20)"); + UsageError(" --min-new-methods-percent-change=percentage between 0 and 100 (default 2)"); UsageError(" the min percent of new methods to trigger a compilation."); - UsageError(" --min-new-classes-percent-change=percentage between 0 and 100 (default 20)"); + UsageError(" --min-new-classes-percent-change=percentage between 0 and 100 (default 2)"); UsageError(" the min percent of new classes to trigger a compilation."); UsageError(""); |