Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef8298e8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Perf: Disable KSM during new application launch"

parents 46b619ce dc9b9e22
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -786,7 +786,7 @@ public class OverScroller {

                if (mPerf != null) {
                    mIsPerfLockAcquired = true;
                    mPerf.perfLockAcquire(mDuration, mPerf.CPUS_ON_2, 0x20B, 0x30B);
                    mPerf.perfLockAcquire(mDuration, mPerf.CPUS_ON_2, 0x20B, 0x30B,0x1B00);
                }
            }

+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ LOCAL_SRC_FILES := \

LOCAL_MODULE:= services

LOCAL_JAVA_LIBRARIES := android.policy conscrypt telephony-common
LOCAL_JAVA_LIBRARIES := android.policy conscrypt telephony-common org.codeaurora.Performance

include $(BUILD_JAVA_LIBRARY)

+6 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashSet;

import org.codeaurora.Performance;
/**
 * An entry in the history stack, representing an activity.
 */
@@ -888,6 +889,11 @@ final class ActivityRecord {
        synchronized(service) {
            if (displayStartTime != 0) {
                reportLaunchTimeLocked(SystemClock.uptimeMillis());
                if(mStackSupervisor.mIsPerfLockAcquired == true)
                {
                    mStackSupervisor.mPerf.perfLockRelease();
                    mStackSupervisor.mIsPerfLockAcquired = false;
                }
            }
            startTime = 0;
            finishLaunchTickingLocked();
+14 −1
Original line number Diff line number Diff line
@@ -83,6 +83,10 @@ import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;


import org.codeaurora.Performance;


public final class ActivityStackSupervisor {
    static final boolean DEBUG = ActivityManagerService.DEBUG || false;
    static final boolean DEBUG_ADD_REMOVE = DEBUG || false;
@@ -107,7 +111,8 @@ public final class ActivityStackSupervisor {
    static final int RESUME_TOP_ACTIVITY_MSG = FIRST_SUPERVISOR_STACK_MSG + 2;
    static final int SLEEP_TIMEOUT_MSG = FIRST_SUPERVISOR_STACK_MSG + 3;
    static final int LAUNCH_TIMEOUT_MSG = FIRST_SUPERVISOR_STACK_MSG + 4;

    public Performance mPerf = null;
    public boolean mIsPerfLockAcquired = false;
    // For debugging to make sure the caller when acquiring/releasing our
    // wake lock is the system process.
    static final boolean VALIDATE_WAKE_LOCK_CALLER = false;
@@ -2102,6 +2107,14 @@ public final class ActivityStackSupervisor {
                return ar;
            }
        }
        /* Acquire perf lock during new app launch */
        if (mPerf == null) {
            mPerf = new Performance();
        }
        if (mPerf != null && mIsPerfLockAcquired == false) {
            mPerf.perfLockAcquire(2000,0x1B00);
            mIsPerfLockAcquired = true;
        }
        if (DEBUG_TASKS) Slog.d(TAG, "No task found");
        return null;
    }