Merge "Special case system_server to not create the JIT code cache."
This commit is contained in:
committed by
Android (Google) Code Review
commit
93444eb74f
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user