diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-12 01:01:18 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-12 01:01:18 +0000 |
commit | 20764d2739a71e2d93c2806f5ac80da979d4bfcb (patch) | |
tree | b27b01463388755905959e32acc9072ac333e7c0 | |
parent | 6cccc65379e1f57f5066f5774d764e056d770fad (diff) | |
parent | 45723ff037e5e91f67b2b247fc15049427e4ad06 (diff) |
Snap for 7634030 from 45723ff037e5e91f67b2b247fc15049427e4ad06 to sc-qpr1-release
Change-Id: I6d9e447e9de1f943e6a612438d7a6b8bb0b612d0
-rw-r--r-- | odrefresh/odrefresh.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/odrefresh/odrefresh.cc b/odrefresh/odrefresh.cc index cda39eee04..2cef50dfb2 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", "speed"); + if (compiler_filter == "speed-profile") { + AddDex2OatProfileAndCompilerFilter(&args, profile); + } else { + args.emplace_back("--compiler-filter=" + compiler_filter); + } const std::string image_location = GetSystemServerImagePath(/*on_system=*/false, jar); const std::string install_location = android::base::Dirname(image_location); |