From cffbf1c9b4d6ea7fa58dba77073092f8f4571a00 Mon Sep 17 00:00:00 2001 From: Chris Wailes Date: Fri, 11 Jan 2019 17:13:00 -0800 Subject: Enables the use of the blastula pool. This commit adds the code necessar to initialize and use the blastula pool during application launching. Highlights include: * Modifying ZygoteState to allow the creation of blastula session sockets * Modified application startup to track if a web view process is being created. * Initialization of the blastula pool during Zygote initialization. * Blastula lifecycle management via reporting pipes and event FDs. * Launching of applications via the blastula pool. The creation, maintenance, and use of the blastula pool can be disabled by setting Zygote.BLASTULA_POOL_ENABLED to false. When this feature is disabled applications will launch as they did before this patch. Topic: zygote-prefork Test: make & flash & launch app & check log message Bug: 68253328 Change-Id: I46c32ad09400591e866b6c6121d5a9b0332092f3 Merged-In: I46c32ad09400591e866b6c6121d5a9b0332092f3 --- core/java/android/os/Process.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/java/android/os/Process.java') diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index c7afd411936c..64d14c0b51ca 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -498,7 +498,8 @@ public class Process { String[] zygoteArgs) { return ZYGOTE_PROCESS.start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, - abi, instructionSet, appDataDir, invokeWith, zygoteArgs); + abi, instructionSet, appDataDir, invokeWith, + /*useBlastulaPool=*/ true, zygoteArgs); } /** @hide */ @@ -515,7 +516,8 @@ public class Process { String[] zygoteArgs) { return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, - abi, instructionSet, appDataDir, invokeWith, zygoteArgs); + abi, instructionSet, appDataDir, invokeWith, + /*useBlastulaPool=*/ false, zygoteArgs); } /** -- cgit v1.2.3