Enable ProfileSaver to have a different delay for the first ever save
The runtime now supports -Xps-first-save-ms, which when configured
may alter the delay for the first ever profile save. Subsequent
saves will proceed based on the existing -Xps-min-save-period-ms.
The first ever save is an approximation, and computed by checking
the profiles size.
Test: gtest & manual
Bug: 185979271
Change-Id: I7119b9d2b8829653046565426090c89f6a619a27
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc
index 779e3e0..10c651b 100644
--- a/cmdline/cmdline_parser_test.cc
+++ b/cmdline/cmdline_parser_test.cc
@@ -487,17 +487,18 @@
* -Xps-*
*/
TEST_F(CmdlineParserTest, ProfileSaverOptions) {
- ProfileSaverOptions opt = ProfileSaverOptions(true, 1, 2, 3, 4, 5, 6, 7, "abc", true);
+ ProfileSaverOptions opt = ProfileSaverOptions(true, 1, 2, 3, 4, 5, 6, 7, 8, "abc", true);
EXPECT_SINGLE_PARSE_VALUE(opt,
"-Xjitsaveprofilinginfo "
"-Xps-min-save-period-ms:1 "
- "-Xps-save-resolved-classes-delay-ms:2 "
- "-Xps-hot-startup-method-samples:3 "
- "-Xps-min-methods-to-save:4 "
- "-Xps-min-classes-to-save:5 "
- "-Xps-min-notification-before-wake:6 "
- "-Xps-max-notification-before-wake:7 "
+ "-Xps-min-first-save-ms:2 "
+ "-Xps-save-resolved-classes-delay-ms:3 "
+ "-Xps-hot-startup-method-samples:4 "
+ "-Xps-min-methods-to-save:5 "
+ "-Xps-min-classes-to-save:6 "
+ "-Xps-min-notification-before-wake:7 "
+ "-Xps-max-notification-before-wake:8 "
"-Xps-profile-path:abc "
"-Xps-profile-boot-class-path",
M::ProfileSaverOpts);