From 62cd4bbcaaedf512286c21475389bfbd3caba685 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Tue, 8 May 2018 12:42:30 -0700 Subject: [PATCH] Process "dalvik.vm.profilebootimage" system property Read the profile boot image property and pass the appropriate flags to the android runtime. Test: build, flash and check properties Bug: 73313191 Change-Id: Ie972e2eb693678d268e707b9e892c97dd7dd061b --- core/jni/AndroidRuntime.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index bd6ad2cf3807f..659149730dbd2 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -732,6 +732,12 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote) jittransitionweightOptBuf, "-Xjittransitionweight:"); + property_get("dalvik.vm.profilebootimage", propBuf, ""); + if (strcmp(propBuf, "true") == 0) { + addOption("-Xps-profile-boot-class-path"); + addOption("-Xps-profile-aot-code"); + } + /* * Madvise related options. */