Loading core/jni/com_android_internal_os_Zygote.cpp +9 −9 Original line number Original line Diff line number Diff line Loading @@ -1974,6 +1974,15 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids, : CREATE_ERROR("createProcessGroup(%d, %d) failed: %s", uid, : CREATE_ERROR("createProcessGroup(%d, %d) failed: %s", uid, /* pid= */ 0, strerror(-rc))); /* pid= */ 0, strerror(-rc))); } } if (is_system_server && UsePerAppMemcg()) { // Assign system_server to the correct memory cgroup. // Not all devices mount memcg so check if it is mounted first // to avoid unnecessarily printing errors and denials in the logs. if (!SetTaskProfiles(getpid(), std::vector<std::string>{"SystemMemoryProcess"})) { ALOGE("couldn't add process %d into system memcg group", getpid()); } } } } SetGids(env, gids, is_child_zygote, fail_fn); SetGids(env, gids, is_child_zygote, fail_fn); Loading Loading @@ -2627,15 +2636,6 @@ static jint com_android_internal_os_Zygote_nativeForkSystemServer( ALOGE("System server process %d has died. Restarting Zygote!", pid); ALOGE("System server process %d has died. Restarting Zygote!", pid); RuntimeAbort(env, __LINE__, "System server process has died. Restarting Zygote!"); RuntimeAbort(env, __LINE__, "System server process has died. Restarting Zygote!"); } } if (UsePerAppMemcg()) { // Assign system_server to the correct memory cgroup. // Not all devices mount memcg so check if it is mounted first // to avoid unnecessarily printing errors and denials in the logs. if (!SetTaskProfiles(pid, std::vector<std::string>{"SystemMemoryProcess"})) { ALOGE("couldn't add process %d into system memcg group", pid); } } } } return pid; return pid; } } Loading Loading
core/jni/com_android_internal_os_Zygote.cpp +9 −9 Original line number Original line Diff line number Diff line Loading @@ -1974,6 +1974,15 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids, : CREATE_ERROR("createProcessGroup(%d, %d) failed: %s", uid, : CREATE_ERROR("createProcessGroup(%d, %d) failed: %s", uid, /* pid= */ 0, strerror(-rc))); /* pid= */ 0, strerror(-rc))); } } if (is_system_server && UsePerAppMemcg()) { // Assign system_server to the correct memory cgroup. // Not all devices mount memcg so check if it is mounted first // to avoid unnecessarily printing errors and denials in the logs. if (!SetTaskProfiles(getpid(), std::vector<std::string>{"SystemMemoryProcess"})) { ALOGE("couldn't add process %d into system memcg group", getpid()); } } } } SetGids(env, gids, is_child_zygote, fail_fn); SetGids(env, gids, is_child_zygote, fail_fn); Loading Loading @@ -2627,15 +2636,6 @@ static jint com_android_internal_os_Zygote_nativeForkSystemServer( ALOGE("System server process %d has died. Restarting Zygote!", pid); ALOGE("System server process %d has died. Restarting Zygote!", pid); RuntimeAbort(env, __LINE__, "System server process has died. Restarting Zygote!"); RuntimeAbort(env, __LINE__, "System server process has died. Restarting Zygote!"); } } if (UsePerAppMemcg()) { // Assign system_server to the correct memory cgroup. // Not all devices mount memcg so check if it is mounted first // to avoid unnecessarily printing errors and denials in the logs. if (!SetTaskProfiles(pid, std::vector<std::string>{"SystemMemoryProcess"})) { ALOGE("couldn't add process %d into system memcg group", pid); } } } } return pid; return pid; } } Loading