summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiakai Zhang <jiakaiz@google.com>2023-11-20 16:24:50 +0000
committerCherrypicker Worker <android-build-cherrypicker-worker@google.com>2023-11-27 11:39:02 +0000
commit6ab2b677d44b9022242a50ab6851d564e98d60d6 (patch)
tree4554c26cfcbec82b8d4b8c294d7ade821a6170e6
parent482f4cf8d32fe082a3cf89187933171fdc98c8ca (diff)
downloadart-6ab2b677d44b9022242a50ab6851d564e98d60d6.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) Merged-In: Ic40f64c4e626610d3d03b95c79a20d151371b1ff Change-Id: Ic40f64c4e626610d3d03b95c79a20d151371b1ff
-rw-r--r--profman/profile_assistant.h4
-rw-r--r--profman/profile_assistant_test.cc20
-rw-r--r--profman/profman.cc4
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("");