summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiakai Zhang <jiakaiz@google.com>2021-08-11 04:26:18 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-08-11 04:26:18 +0000
commit7fc95508b5fd0fbf159cd6302f206f0484a6624b (patch)
tree843fb753d97f9357e342328a4d9a188598a0db03
parentcef1b04d49db146400717cec1deed3271a8dad3e (diff)
parenta2f7d4d842146bc06a2410026d7099d6d5bb8f13 (diff)
odrefresh: Defaults to using "speed" for compiling system_server. am: a2f7d4d842
Original change: https://googleplex-android-review.googlesource.com/c/platform/art/+/15500417 Change-Id: I08732922f9269c66b13253121d761c30694a11f9
-rw-r--r--odrefresh/odrefresh.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/odrefresh/odrefresh.cc b/odrefresh/odrefresh.cc
index cda39eee04..e9c0c637bb 100644
--- a/odrefresh/odrefresh.cc
+++ b/odrefresh/odrefresh.cc
@@ -1139,7 +1139,13 @@ class OnDeviceRefresh final {
AddDex2OatInstructionSet(&args, isa);
const std::string jar_name(android::base::Basename(jar));
const std::string profile = Concatenate({GetAndroidRoot(), "/framework/", jar_name, ".prof"});
- AddDex2OatProfileAndCompilerFilter(&args, profile);
+ std::string compiler_filter =
+ android::base::GetProperty("dalvik.vm.systemservercompilerfilter", {});
+ if (compiler_filter == "speed-profile") {
+ AddDex2OatProfileAndCompilerFilter(&args, profile);
+ } else {
+ args.emplace_back("--compiler-filter=speed");
+ }
const std::string image_location = GetSystemServerImagePath(/*on_system=*/false, jar);
const std::string install_location = android::base::Dirname(image_location);