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
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc
index 07639e8..b224ec7 100644
--- a/cmdline/cmdline_parser_test.cc
+++ b/cmdline/cmdline_parser_test.cc
@@ -484,7 +484,7 @@
* -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 @@
"-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