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

Commit 033c8797 authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Trace process launch from ActivityManager.

Change-Id: I13b7695fba2e77428a74c0215f65eea8d07dda07
parent 2dcba49c
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -55,6 +55,7 @@ import android.graphics.Rect;
import android.os.BatteryStats;
import android.os.BatteryStats;
import android.os.PersistableBundle;
import android.os.PersistableBundle;
import android.os.PowerManager;
import android.os.PowerManager;
import android.os.Trace;
import android.os.TransactionTooLargeException;
import android.os.TransactionTooLargeException;
import android.os.WorkSource;
import android.os.WorkSource;
import android.os.storage.IMountService;
import android.os.storage.IMountService;
@@ -3283,12 +3284,15 @@ public final class ActivityManagerService extends ActivityManagerNative
            // the PID of the new process, or else throw a RuntimeException.
            // the PID of the new process, or else throw a RuntimeException.
            boolean isActivityProcess = (entryPoint == null);
            boolean isActivityProcess = (entryPoint == null);
            if (entryPoint == null) entryPoint = "android.app.ActivityThread";
            if (entryPoint == null) entryPoint = "android.app.ActivityThread";
            Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "Start proc: " +
                    app.processName);
            checkTime(startTime, "startProcess: asking zygote to start proc");
            checkTime(startTime, "startProcess: asking zygote to start proc");
            Process.ProcessStartResult startResult = Process.start(entryPoint,
            Process.ProcessStartResult startResult = Process.start(entryPoint,
                    app.processName, uid, uid, gids, debugFlags, mountExternal,
                    app.processName, uid, uid, gids, debugFlags, mountExternal,
                    app.info.targetSdkVersion, app.info.seinfo, requiredAbi, instructionSet,
                    app.info.targetSdkVersion, app.info.seinfo, requiredAbi, instructionSet,
                    app.info.dataDir, entryPointArgs);
                    app.info.dataDir, entryPointArgs);
            checkTime(startTime, "startProcess: returned from zygote!");
            checkTime(startTime, "startProcess: returned from zygote!");
            Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
            if (app.isolated) {
            if (app.isolated) {
                mBatteryStatsService.addIsolatedUid(app.uid, app.info.uid);
                mBatteryStatsService.addIsolatedUid(app.uid, app.info.uid);