Loading core/jni/Android.mk +0 −4 Original line number Original line Diff line number Diff line Loading @@ -20,10 +20,6 @@ ifneq ($(ENABLE_CPUSETS),) LOCAL_CFLAGS += -DENABLE_CPUSETS LOCAL_CFLAGS += -DENABLE_CPUSETS endif endif ifneq ($(ENABLE_SCHED_BOOST),) LOCAL_CFLAGS += -DENABLE_SCHED_BOOST endif LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -DU_USING_ICU_NAMESPACE=0 LOCAL_CFLAGS += -DU_USING_ICU_NAMESPACE=0 Loading core/jni/com_android_internal_os_Zygote.cpp +0 −30 Original line number Original line Diff line number Diff line Loading @@ -437,27 +437,6 @@ void SetThreadName(const char* thread_name) { } } } } #ifdef ENABLE_SCHED_BOOST static void SetForkLoad(bool boost) { // set scheduler knob to boost forked processes pid_t currentPid = getpid(); // fits at most "/proc/XXXXXXX/sched_init_task_load\0" char schedPath[35]; snprintf(schedPath, sizeof(schedPath), "/proc/%u/sched_init_task_load", currentPid); int schedBoostFile = open(schedPath, O_WRONLY); if (schedBoostFile < 0) { ALOGW("Unable to set zygote scheduler boost"); return; } if (boost) { write(schedBoostFile, "100\0", 4); } else { write(schedBoostFile, "0\0", 2); } close(schedBoostFile); } #endif // The list of open zygote file descriptors. // The list of open zygote file descriptors. static FileDescriptorTable* gOpenFdTable = NULL; static FileDescriptorTable* gOpenFdTable = NULL; Loading @@ -471,10 +450,6 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra jstring instructionSet, jstring dataDir) { jstring instructionSet, jstring dataDir) { SetSigChldHandler(); SetSigChldHandler(); #ifdef ENABLE_SCHED_BOOST SetForkLoad(true); #endif sigset_t sigchld; sigset_t sigchld; sigemptyset(&sigchld); sigemptyset(&sigchld); sigaddset(&sigchld, SIGCHLD); sigaddset(&sigchld, SIGCHLD); Loading Loading @@ -655,11 +630,6 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra } else if (pid > 0) { } else if (pid > 0) { // the parent process // the parent process #ifdef ENABLE_SCHED_BOOST // unset scheduler knob SetForkLoad(false); #endif // We blocked SIGCHLD prior to a fork, we unblock it here. // We blocked SIGCHLD prior to a fork, we unblock it here. if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) { if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) { ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno)); ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno)); Loading Loading
core/jni/Android.mk +0 −4 Original line number Original line Diff line number Diff line Loading @@ -20,10 +20,6 @@ ifneq ($(ENABLE_CPUSETS),) LOCAL_CFLAGS += -DENABLE_CPUSETS LOCAL_CFLAGS += -DENABLE_CPUSETS endif endif ifneq ($(ENABLE_SCHED_BOOST),) LOCAL_CFLAGS += -DENABLE_SCHED_BOOST endif LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -DU_USING_ICU_NAMESPACE=0 LOCAL_CFLAGS += -DU_USING_ICU_NAMESPACE=0 Loading
core/jni/com_android_internal_os_Zygote.cpp +0 −30 Original line number Original line Diff line number Diff line Loading @@ -437,27 +437,6 @@ void SetThreadName(const char* thread_name) { } } } } #ifdef ENABLE_SCHED_BOOST static void SetForkLoad(bool boost) { // set scheduler knob to boost forked processes pid_t currentPid = getpid(); // fits at most "/proc/XXXXXXX/sched_init_task_load\0" char schedPath[35]; snprintf(schedPath, sizeof(schedPath), "/proc/%u/sched_init_task_load", currentPid); int schedBoostFile = open(schedPath, O_WRONLY); if (schedBoostFile < 0) { ALOGW("Unable to set zygote scheduler boost"); return; } if (boost) { write(schedBoostFile, "100\0", 4); } else { write(schedBoostFile, "0\0", 2); } close(schedBoostFile); } #endif // The list of open zygote file descriptors. // The list of open zygote file descriptors. static FileDescriptorTable* gOpenFdTable = NULL; static FileDescriptorTable* gOpenFdTable = NULL; Loading @@ -471,10 +450,6 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra jstring instructionSet, jstring dataDir) { jstring instructionSet, jstring dataDir) { SetSigChldHandler(); SetSigChldHandler(); #ifdef ENABLE_SCHED_BOOST SetForkLoad(true); #endif sigset_t sigchld; sigset_t sigchld; sigemptyset(&sigchld); sigemptyset(&sigchld); sigaddset(&sigchld, SIGCHLD); sigaddset(&sigchld, SIGCHLD); Loading Loading @@ -655,11 +630,6 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra } else if (pid > 0) { } else if (pid > 0) { // the parent process // the parent process #ifdef ENABLE_SCHED_BOOST // unset scheduler knob SetForkLoad(false); #endif // We blocked SIGCHLD prior to a fork, we unblock it here. // We blocked SIGCHLD prior to a fork, we unblock it here. if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) { if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) { ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno)); ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno)); Loading