OSDN Git Service

Disable USAP when running in jitzygote mode.
authorNicolas Geoffray <ngeoffray@google.com>
Wed, 10 Apr 2019 13:58:17 +0000 (14:58 +0100)
committerNicolas Geoffray <ngeoffray@google.com>
Wed, 10 Apr 2019 13:58:17 +0000 (14:58 +0100)
The feature needs to be tweaked for it, and currently
regresses app startup.

Test: build jitzygote config, check there is no usap processes
Bug: 119800099
Change-Id: Ic33c539636f206da72d6d0cc51219e8d2dfe23dc

core/java/android/os/ZygoteProcess.java

index bd70f23..ab19fd6 100644 (file)
@@ -646,9 +646,14 @@ public class ZygoteProcess {
                 ZygoteConfig.USAP_POOL_ENABLED, USAP_POOL_ENABLED_DEFAULT);
 
         if (!propertyString.isEmpty()) {
-            mUsapPoolEnabled = Zygote.getConfigurationPropertyBoolean(
+            if (SystemProperties.get("dalvik.vm.boot-image", "").endsWith("apex.art")) {
+                // TODO(b/119800099): Tweak usap configuration in jitzygote mode.
+                mUsapPoolEnabled = false;
+            } else {
+                mUsapPoolEnabled = Zygote.getConfigurationPropertyBoolean(
                     ZygoteConfig.USAP_POOL_ENABLED,
                     Boolean.parseBoolean(USAP_POOL_ENABLED_DEFAULT));
+            }
         }
 
         boolean valueChanged = origVal != mUsapPoolEnabled;