summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/cmdline_parser_test.cc15
-rw-r--r--cmdline/cmdline_types.h6
2 files changed, 14 insertions, 7 deletions
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc
index 779e3e0fb6..10c651b8e5 100644
--- a/cmdline/cmdline_parser_test.cc
+++ b/cmdline/cmdline_parser_test.cc
@@ -487,17 +487,18 @@ TEST_F(CmdlineParserTest, TestJitOptions) {
* -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);
diff --git a/cmdline/cmdline_types.h b/cmdline/cmdline_types.h
index 7b38b8ebe0..c506e03e27 100644
--- a/cmdline/cmdline_types.h
+++ b/cmdline/cmdline_types.h
@@ -788,6 +788,12 @@ struct CmdlineType<ProfileSaverOptions> : CmdlineTypeParser<ProfileSaverOptions>
&ProfileSaverOptions::min_save_period_ms_,
type_parser.Parse(suffix));
}
+ if (android::base::StartsWith(option, "min-first-save-ms:")) {
+ CmdlineType<unsigned int> type_parser;
+ return ParseInto(existing,
+ &ProfileSaverOptions::min_first_save_ms_,
+ type_parser.Parse(suffix));
+ }
if (android::base::StartsWith(option, "save-resolved-classes-delay-ms:")) {
CmdlineType<unsigned int> type_parser;
return ParseInto(existing,