diff options
| author | 2015-12-11 15:01:04 +0000 | |
|---|---|---|
| committer | 2015-12-11 15:01:04 +0000 | |
| commit | 3c43b3863328e339dff90b216aed15194d129e4a (patch) | |
| tree | b0ef66e9b7e86724a007ffbb135d23f38a9ea113 | |
| parent | 026688070c8002911dc0a8f1fb487bf5bfed52d4 (diff) | |
Special case system_server to not create the JIT code cache.
Change-Id: I7d2622f560435b2b6d133b0acd2659f3410acd2e
| -rw-r--r-- | core/java/com/android/internal/os/Zygote.java | 5 | ||||
| -rw-r--r-- | core/jni/com_android_internal_os_Zygote.cpp | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java index 8186378bfb6f..d23f26d675c4 100644 --- a/core/java/com/android/internal/os/Zygote.java +++ b/core/java/com/android/internal/os/Zygote.java @@ -145,8 +145,9 @@ public final class Zygote { native private static int nativeForkSystemServer(int uid, int gid, int[] gids, int debugFlags, int[][] rlimits, long permittedCapabilities, long effectiveCapabilities); - private static void callPostForkChildHooks(int debugFlags, String instructionSet) { - VM_HOOKS.postForkChild(debugFlags, instructionSet); + private static void callPostForkChildHooks(int debugFlags, boolean isSystemServer, + String instructionSet) { + VM_HOOKS.postForkChild(debugFlags, isSystemServer, instructionSet); } diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 73c74876c292..96d150be0234 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -581,7 +581,7 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra UnsetSigChldHandler(); env->CallStaticVoidMethod(gZygoteClass, gCallPostForkChildHooks, debug_flags, - is_system_server ? NULL : instructionSet); + is_system_server, instructionSet); if (env->ExceptionCheck()) { RuntimeAbort(env, __LINE__, "Error calling post fork hooks."); } @@ -652,7 +652,7 @@ static const JNINativeMethod gMethods[] = { int register_com_android_internal_os_Zygote(JNIEnv* env) { gZygoteClass = MakeGlobalRefOrDie(env, FindClassOrDie(env, kZygoteClassName)); gCallPostForkChildHooks = GetStaticMethodIDOrDie(env, gZygoteClass, "callPostForkChildHooks", - "(ILjava/lang/String;)V"); + "(IZLjava/lang/String;)V"); return RegisterMethodsOrDie(env, "com/android/internal/os/Zygote", gMethods, NELEM(gMethods)); } |