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

Commit 1ff3950f authored by Tapas Kumar Kundu's avatar Tapas Kumar Kundu Committed by Abhimanyu Garg
Browse files

Enabling launch boost for subsequent launch.

Enabling the application launch boost for subsequent application launch,
also modifying the launch boost parameter by turning off two big cores.
This change will improve the first application, subsequent launch
and back to home latency.

Change-Id: Id72aecb3cb417608436c0fe15245d4a98af8e7ff
parent fcb238c9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2049,11 +2049,13 @@
         service state to display signal strength bars -->
    <bool name="config_combined_signal">true</bool>

    <!-- Whether cpu boost is enabled for AppLaunch -->
    <!-- Whether cpu boost is enabled for both application's 1st launch,subsequent
         launch and in-app-activity -->
    <bool name="config_enableCpuBoostForAppLaunch">false</bool>
    <integer name="launchboost_timeout_param">0</integer>
    <integer name="launchboost_schedboost_param">0</integer>
    <integer name="launchboost_cpuboost_param">0</integer>
    <integer name="launchboost_cpu_6_7_offline_param">0</integer>
    <integer name="launchboost_pcdisbl_param">0</integer>
    <integer name="launchboost_ksmboost_param">0</integer>

+1 −0
Original line number Diff line number Diff line
@@ -2196,6 +2196,7 @@
  <java-symbol type="integer" name="launchboost_timeout_param" />
  <java-symbol type="integer" name="launchboost_schedboost_param" />
  <java-symbol type="integer" name="launchboost_cpuboost_param" />
  <java-symbol type="integer" name="launchboost_cpu_6_7_offline_param" />
  <java-symbol type="integer" name="launchboost_pcdisbl_param" />
  <java-symbol type="integer" name="launchboost_ksmboost_param" />

+16 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ import java.util.List;

/* Perf */
import org.codeaurora.Performance;
import android.os.Trace;

public final class ActivityStackSupervisor implements DisplayListener {
    static final boolean DEBUG = ActivityManagerService.DEBUG || false;
@@ -147,6 +148,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
    public boolean mIsPerfBoostEnabled = false;
    public int lBoostTimeOut = 0;
    public int lBoostCpuBoost = 0;
    public int lBoostCpuOffline = 0;
    public int lBoostSchedBoost = 0;
    public int lBoostPcDisblBoost = 0;
    public int lBoostKsmBoost = 0;
@@ -317,6 +319,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
                   com.android.internal.R.integer.launchboost_timeout_param);
           lBoostCpuBoost = mService.mContext.getResources().getInteger(
                   com.android.internal.R.integer.launchboost_cpuboost_param);
           lBoostCpuOffline = mService.mContext.getResources().getInteger(
                   com.android.internal.R.integer.launchboost_cpu_6_7_offline_param);
           lBoostPcDisblBoost = mService.mContext.getResources().getInteger(
                   com.android.internal.R.integer.launchboost_pcdisbl_param);
           lBoostKsmBoost = mService.mContext.getResources().getInteger(
@@ -1327,6 +1331,18 @@ public final class ActivityStackSupervisor implements DisplayListener {
                            Display.DEFAULT_DISPLAY : mFocusedStack.mDisplayId) :
                            (container.mActivityDisplay == null ? Display.DEFAULT_DISPLAY :
                                    container.mActivityDisplay.mDisplayId)));
            Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER , "startActivityLocked");
            /* Acquire perf lock during new app launch */
            if (mIsPerfBoostEnabled == true && mPerf == null) {
                mPerf = new Performance();
            }
            if (mPerf != null) {
                mPerf.perfLockAcquire(lBoostTimeOut, lBoostPcDisblBoost,
                                      lBoostSchedBoost, lBoostCpuBoost,
                                      lBoostCpuOffline,
                                      lBoostKsmBoost);
            }
            Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
        }

        ActivityRecord sourceRecord = null;