summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2019-10-02 14:33:43 -0700
committer android-build-merger <android-build-merger@google.com> 2019-10-02 14:33:43 -0700
commita47b6f6862773241609f196c9a5983a2515deb03 (patch)
tree184a6d25ec15b94fa19f01d7d6689da12d98d5c0
parent028f3b3d1471109fec673b60249e825bad68eb93 (diff)
parent7c03e6da834578ab6cc35ba5adec471707088081 (diff)
Merge "Pass down apex image if profilebootimage is enabled" am: 5f8d418980 am: 38b912fe51 am: 062f3899ac
am: 7c03e6da83 Change-Id: Ieca6a45662447a6b4a2569aa57c70cccd635f12c
-rw-r--r--cmds/installd/dexopt.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp
index 7eee749be9..19346c7c17 100644
--- a/cmds/installd/dexopt.cpp
+++ b/cmds/installd/dexopt.cpp
@@ -303,6 +303,9 @@ static const char* ENABLE_APEX_IMAGE = "enable_apex_image";
// Location of the apex image.
static const char* kApexImage = "/system/framework/apex.art";
+// Phenotype property name for enabling profiling the boot class path.
+static const char* PROFILE_BOOT_CLASS_PATH = "profilebootclasspath";
+
class RunDex2Oat : public ExecVHelper {
public:
RunDex2Oat(int zip_fd,
@@ -402,7 +405,15 @@ class RunDex2Oat : public ExecVHelper {
server_configurable_flags::GetServerConfigurableFlag(RUNTIME_NATIVE_BOOT_NAMESPACE,
ENABLE_APEX_IMAGE,
/*default_value=*/ "");
- if (use_apex_image == "true") {
+
+ std::string profile_boot_class_path = GetProperty("dalvik.vm.profilebootclasspath", "");
+ profile_boot_class_path =
+ server_configurable_flags::GetServerConfigurableFlag(
+ RUNTIME_NATIVE_BOOT_NAMESPACE,
+ PROFILE_BOOT_CLASS_PATH,
+ /*default_value=*/ profile_boot_class_path);
+
+ if (use_apex_image == "true" || profile_boot_class_path == "true") {
boot_image = StringPrintf("-Ximage:%s", kApexImage);
} else {
boot_image = MapPropertyToArg("dalvik.vm.boot-image", "-Ximage:%s");