diff options
author | Mathieu Chartier <mathieuc@google.com> | 2017-06-10 14:35:11 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2017-06-12 22:45:58 -0700 |
commit | 885a7133472fd01321cbe545ace9c2acae543bf1 (patch) | |
tree | f3bc66aaff2f38edc3673c3cfb4aba80f5e08242 /cmdline | |
parent | 16d59b2b0ff202be99cbe24830e8a5080b774357 (diff) | |
download | android_art-885a7133472fd01321cbe545ace9c2acae543bf1.tar.gz android_art-885a7133472fd01321cbe545ace9c2acae543bf1.tar.bz2 android_art-885a7133472fd01321cbe545ace9c2acae543bf1.zip |
Add support for profiling boot class path
Added a runtime option -Xps-profile-boot-class-path that makes the
profile saver take samples for the boot dex files. The motivation is
to use this for improving boot image creation.
Added test case to test 595.
Test: adb shell setprop dalvik.vm.extra-opts "'-Xusejit:false -Xint -Xps-profile-boot-class-path -verbose:profiler'"
Test: Pull profile and look at output
Test: test-art-host
Test: test/run-test --host 595-profile-saving
Bug: 37966211
(cherry picked from commit 08fee9c7db427e90dbe75692e6bc0242643cb3c5)
Change-Id: Id95de103ed14841d9c209946ea7f1c4f6b5d23a5
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/cmdline_parser_test.cc | 5 | ||||
-rw-r--r-- | cmdline/cmdline_types.h | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc index 07639e8a7d..b224ec72de 100644 --- a/cmdline/cmdline_parser_test.cc +++ b/cmdline/cmdline_parser_test.cc @@ -484,7 +484,7 @@ TEST_F(CmdlineParserTest, TestJitOptions) { * -Xps-* */ TEST_F(CmdlineParserTest, ProfileSaverOptions) { - ProfileSaverOptions opt = ProfileSaverOptions(true, 1, 2, 3, 4, 5, 6, 7, "abc"); + ProfileSaverOptions opt = ProfileSaverOptions(true, 1, 2, 3, 4, 5, 6, 7, "abc", true); EXPECT_SINGLE_PARSE_VALUE(opt, "-Xjitsaveprofilinginfo " @@ -495,7 +495,8 @@ TEST_F(CmdlineParserTest, ProfileSaverOptions) { "-Xps-min-classes-to-save:5 " "-Xps-min-notification-before-wake:6 " "-Xps-max-notification-before-wake:7 " - "-Xps-profile-path:abc", + "-Xps-profile-path:abc " + "-Xps-profile-boot-class-path", M::ProfileSaverOpts); } // TEST_F diff --git a/cmdline/cmdline_types.h b/cmdline/cmdline_types.h index 185a0e403e..4de8a48d45 100644 --- a/cmdline/cmdline_types.h +++ b/cmdline/cmdline_types.h @@ -712,6 +712,11 @@ struct CmdlineType<ProfileSaverOptions> : CmdlineTypeParser<ProfileSaverOptions> return Result::SuccessNoValue(); } + if (option == "profile-boot-class-path") { + existing.profile_boot_class_path_ = true; + return Result::SuccessNoValue(); + } + // The rest of these options are always the wildcard from '-Xps-*' std::string suffix = RemovePrefix(option); |