Loading services/core/java/com/android/server/am/ActivityManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -4766,7 +4766,8 @@ public class ActivityManagerService extends IActivityManager.Stub packageName == null ? ApplicationExitInfo.REASON_USER_STOPPED : ApplicationExitInfo.REASON_USER_REQUESTED, ApplicationExitInfo.SUBREASON_UNKNOWN, packageName == null ? ("stop user " + userId) : ("stop " + packageName)); (packageName == null ? ("stop user " + userId) : ("stop " + packageName)) + " due to " + reason); didSomething |= mAtmInternal.onForceStopPackage(packageName, doit, evenPersistent, userId); Loading Loading @@ -17066,6 +17067,7 @@ public class ActivityManagerService extends IActivityManager.Stub proc.lastCachedPss = pss; proc.lastCachedSwapPss = swapPss; } proc.mLastRss = rss; final SparseArray<Pair<Long, String>> watchUids = mMemWatchProcesses.getMap().get(proc.processName); services/core/java/com/android/server/am/AppExitInfoTracker.java +14 −5 Original line number Diff line number Diff line Loading @@ -505,9 +505,13 @@ public final class AppExitInfoTracker { @VisibleForTesting void onPackageRemoved(String packageName, int uid, boolean allUsers) { if (packageName != null) { final boolean removeUid = TextUtils.isEmpty( mService.mPackageManagerInt.getNameForUid(uid)); if (removeUid) { mAppExitInfoSourceZygote.removeByUid(uid, allUsers); mAppExitInfoSourceLmkd.removeByUid(uid, allUsers); mIsolatedUidRecords.removeAppUid(uid, allUsers); } removePackage(packageName, allUsers ? UserHandle.USER_ALL : UserHandle.getUserId(uid)); schedulePersistProcessExitInfo(true); } Loading @@ -533,6 +537,11 @@ public final class AppExitInfoTracker { mService.mContext.registerReceiverForAllUsers(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { boolean replacing = intent.getBooleanExtra( Intent.EXTRA_REPLACING, false); if (replacing) { return; } int uid = intent.getIntExtra(Intent.EXTRA_UID, UserHandle.USER_NULL); boolean allUsers = intent.getBooleanExtra( Intent.EXTRA_REMOVED_FOR_ALL_USERS, false); Loading Loading @@ -835,8 +844,8 @@ public final class AppExitInfoTracker { info.setReason(ApplicationExitInfo.REASON_UNKNOWN); info.setStatus(0); info.setImportance(procStateToImportance(app.setProcState)); info.setPss(app.lastMemInfo == null ? 0 : app.lastMemInfo.getTotalPss()); info.setRss(app.lastMemInfo == null ? 0 : app.lastMemInfo.getTotalRss()); info.setPss(app.lastPss); info.setRss(app.mLastRss); info.setTimestamp(System.currentTimeMillis()); return info; Loading services/core/java/com/android/server/am/ProcessRecord.java +3 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,8 @@ class ProcessRecord implements WindowProcessListener { // set of disabled compat changes for the process (all others are enabled) long[] mDisabledCompatChanges; long mLastRss; // Last computed memory rss. // The precede instance of the process, which would exist when the previous process is killed // but not fully dead yet; in this case, the new instance of the process should be held until // this precede instance is fully dead. Loading Loading @@ -431,6 +433,7 @@ class ProcessRecord implements WindowProcessListener { pw.print(" lastSwapPss="); DebugUtils.printSizeValue(pw, lastSwapPss*1024); pw.print(" lastCachedPss="); DebugUtils.printSizeValue(pw, lastCachedPss*1024); pw.print(" lastCachedSwapPss="); DebugUtils.printSizeValue(pw, lastCachedSwapPss*1024); pw.print(" lastRss="); DebugUtils.printSizeValue(pw, mLastRss * 1024); pw.println(); pw.print(prefix); pw.print("procStateMemTracker: "); procStateMemTracker.dumpLine(pw); Loading services/tests/mockingservicestests/src/com/android/server/am/ApplicationExitInfoTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -847,8 +847,8 @@ public class ApplicationExitInfoTest { app.connectionGroup = connectionGroup; app.setProcState = procState; app.lastMemInfo = spy(new Debug.MemoryInfo()); doReturn((int) pss).when(app.lastMemInfo).getTotalPss(); doReturn((int) rss).when(app.lastMemInfo).getTotalRss(); app.lastPss = pss; app.mLastRss = rss; return app; } Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -4766,7 +4766,8 @@ public class ActivityManagerService extends IActivityManager.Stub packageName == null ? ApplicationExitInfo.REASON_USER_STOPPED : ApplicationExitInfo.REASON_USER_REQUESTED, ApplicationExitInfo.SUBREASON_UNKNOWN, packageName == null ? ("stop user " + userId) : ("stop " + packageName)); (packageName == null ? ("stop user " + userId) : ("stop " + packageName)) + " due to " + reason); didSomething |= mAtmInternal.onForceStopPackage(packageName, doit, evenPersistent, userId); Loading Loading @@ -17066,6 +17067,7 @@ public class ActivityManagerService extends IActivityManager.Stub proc.lastCachedPss = pss; proc.lastCachedSwapPss = swapPss; } proc.mLastRss = rss; final SparseArray<Pair<Long, String>> watchUids = mMemWatchProcesses.getMap().get(proc.processName);
services/core/java/com/android/server/am/AppExitInfoTracker.java +14 −5 Original line number Diff line number Diff line Loading @@ -505,9 +505,13 @@ public final class AppExitInfoTracker { @VisibleForTesting void onPackageRemoved(String packageName, int uid, boolean allUsers) { if (packageName != null) { final boolean removeUid = TextUtils.isEmpty( mService.mPackageManagerInt.getNameForUid(uid)); if (removeUid) { mAppExitInfoSourceZygote.removeByUid(uid, allUsers); mAppExitInfoSourceLmkd.removeByUid(uid, allUsers); mIsolatedUidRecords.removeAppUid(uid, allUsers); } removePackage(packageName, allUsers ? UserHandle.USER_ALL : UserHandle.getUserId(uid)); schedulePersistProcessExitInfo(true); } Loading @@ -533,6 +537,11 @@ public final class AppExitInfoTracker { mService.mContext.registerReceiverForAllUsers(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { boolean replacing = intent.getBooleanExtra( Intent.EXTRA_REPLACING, false); if (replacing) { return; } int uid = intent.getIntExtra(Intent.EXTRA_UID, UserHandle.USER_NULL); boolean allUsers = intent.getBooleanExtra( Intent.EXTRA_REMOVED_FOR_ALL_USERS, false); Loading Loading @@ -835,8 +844,8 @@ public final class AppExitInfoTracker { info.setReason(ApplicationExitInfo.REASON_UNKNOWN); info.setStatus(0); info.setImportance(procStateToImportance(app.setProcState)); info.setPss(app.lastMemInfo == null ? 0 : app.lastMemInfo.getTotalPss()); info.setRss(app.lastMemInfo == null ? 0 : app.lastMemInfo.getTotalRss()); info.setPss(app.lastPss); info.setRss(app.mLastRss); info.setTimestamp(System.currentTimeMillis()); return info; Loading
services/core/java/com/android/server/am/ProcessRecord.java +3 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,8 @@ class ProcessRecord implements WindowProcessListener { // set of disabled compat changes for the process (all others are enabled) long[] mDisabledCompatChanges; long mLastRss; // Last computed memory rss. // The precede instance of the process, which would exist when the previous process is killed // but not fully dead yet; in this case, the new instance of the process should be held until // this precede instance is fully dead. Loading Loading @@ -431,6 +433,7 @@ class ProcessRecord implements WindowProcessListener { pw.print(" lastSwapPss="); DebugUtils.printSizeValue(pw, lastSwapPss*1024); pw.print(" lastCachedPss="); DebugUtils.printSizeValue(pw, lastCachedPss*1024); pw.print(" lastCachedSwapPss="); DebugUtils.printSizeValue(pw, lastCachedSwapPss*1024); pw.print(" lastRss="); DebugUtils.printSizeValue(pw, mLastRss * 1024); pw.println(); pw.print(prefix); pw.print("procStateMemTracker: "); procStateMemTracker.dumpLine(pw); Loading
services/tests/mockingservicestests/src/com/android/server/am/ApplicationExitInfoTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -847,8 +847,8 @@ public class ApplicationExitInfoTest { app.connectionGroup = connectionGroup; app.setProcState = procState; app.lastMemInfo = spy(new Debug.MemoryInfo()); doReturn((int) pss).when(app.lastMemInfo).getTotalPss(); doReturn((int) rss).when(app.lastMemInfo).getTotalRss(); app.lastPss = pss; app.mLastRss = rss; return app; } Loading