Home
last modified time | relevance | path

Searched refs:cpuTimesMs (Results 1 – 3 of 3) sorted by relevance

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBstatsCpuTimesValidationTest.java196 final long[] cpuTimesMs = getAllCpuFreqTimes(sTestPkgUid); in testCpuFreqTimes() local
197 assertCpuTimesValid(cpuTimesMs); in testCpuFreqTimes()
199 for (int i = 0; i < cpuTimesMs.length / 2; ++i) { in testCpuFreqTimes()
200 actualCpuTimeMs += cpuTimesMs[i]; in testCpuFreqTimes()
224 final long[] cpuTimesMs = getAllCpuFreqTimes(sTestPkgUid); in testCpuFreqTimes_screenOff() local
225 assertCpuTimesValid(cpuTimesMs); in testCpuFreqTimes_screenOff()
227 for (int i = 0; i < cpuTimesMs.length / 2; ++i) { in testCpuFreqTimes_screenOff()
228 actualTotalCpuTimeMs += cpuTimesMs[i]; in testCpuFreqTimes_screenOff()
232 for (int i = cpuTimesMs.length / 2; i < cpuTimesMs.length; ++i) { in testCpuFreqTimes_screenOff()
233 actualScreenOffCpuTimeMs += cpuTimesMs[i]; in testCpuFreqTimes_screenOff()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DKernelSingleUidTimeReader.java91 final long[] cpuTimesMs = mInjector.readBpfData(uid); in readDeltaMs() local
92 if (cpuTimesMs.length == 0) { in readDeltaMs()
94 } else if (!mCpuFreqsCountVerified && cpuTimesMs.length != mCpuFreqsCount) { in readDeltaMs()
99 return computeDelta(uid, cpuTimesMs); in readDeltaMs()
106 final long[] cpuTimesMs; in readDeltaMs() local
114 cpuTimesMs = readCpuTimesFromByteBuffer(buffer); in readDeltaMs()
123 return computeDelta(uid, cpuTimesMs); in readDeltaMs()
139 final long[] cpuTimesMs; in readCpuTimesFromByteBuffer() local
140 cpuTimesMs = new long[mCpuFreqsCount]; in readCpuTimesFromByteBuffer()
143 cpuTimesMs[i] = buffer.getLong() * 10; in readCpuTimesFromByteBuffer()
[all …]
DBatteryStatsImpl.java476 long[] cpuTimesMs = mKernelSingleUidTimeReader.readDeltaMs(uid); in updateProcStateCpuTimes() local
479 cpuTimesMs = addCpuTimes(cpuTimesMs, in updateProcStateCpuTimes()
483 if (onBattery && cpuTimesMs != null) { in updateProcStateCpuTimes()
485 u.addProcStateTimesMs(procState, cpuTimesMs, onBattery); in updateProcStateCpuTimes()
486 u.addProcStateScreenOffTimesMs(procState, cpuTimesMs, onBatteryScreenOff); in updateProcStateCpuTimes()
538 final long[] cpuTimesMs = allUidCpuFreqTimesMs.valueAt(i); in copyFromAllUidsCpuTimes() local
539 if (cpuTimesMs == null) { in copyFromAllUidsCpuTimes()
543 uid, cpuTimesMs.clone()); in copyFromAllUidsCpuTimes()
6853 private long[] nullIfAllZeros(LongSamplingCounterArray cpuTimesMs, int which) { in nullIfAllZeros() argument
6854 if (cpuTimesMs == null) { in nullIfAllZeros()
[all …]