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

Commit 4138f9c1 authored by Kevin Jeon's avatar Kevin Jeon Committed by Android (Google) Code Review
Browse files

Merge "Update duration calculation in AppProfiler" into main

parents f92adf27 298e7d70
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -711,7 +711,7 @@ public class AppProfiler {
                }
            }
            if (profile != null) {
                long startTime = SystemClock.currentThreadTimeMillis();
                long startTime = SystemClock.uptimeMillis();
                // skip background PSS calculation under the following situations:
                //  - app is capturing camera imagery
                //  - app is frozen and we have already collected PSS once.
@@ -721,7 +721,7 @@ public class AppProfiler {
                        || mService.isCameraActiveForUid(profile.mApp.uid)
                        || mService.mConstants.APP_PROFILER_PSS_PROFILING_DISABLED;
                long pss = skipPSSCollection ? 0 : Debug.getPss(pid, tmp, null);
                long endTime = SystemClock.currentThreadTimeMillis();
                long endTime = SystemClock.uptimeMillis();
                synchronized (mProfilerLock) {
                    if (pss != 0 && profile.getThread() != null
                            && profile.getSetProcState() == procState
@@ -852,7 +852,7 @@ public class AppProfiler {
                }
            }
            if (profile != null) {
                long startTime = SystemClock.currentThreadTimeMillis();
                long startTime = SystemClock.uptimeMillis();
                // skip background RSS calculation under the following situations:
                //  - app is capturing camera imagery
                //  - app is frozen and we have already collected RSS once.
@@ -862,7 +862,7 @@ public class AppProfiler {
                        || mService.isCameraActiveForUid(profile.mApp.uid)
                        || mService.mConstants.APP_PROFILER_PSS_PROFILING_DISABLED;
                long rss = skipRSSCollection ? 0 : Debug.getRss(pid, null);
                long endTime = SystemClock.currentThreadTimeMillis();
                long endTime = SystemClock.uptimeMillis();
                synchronized (mProfilerLock) {
                    if (rss != 0 && profile.getThread() != null
                            && profile.getSetProcState() == procState