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

Commit 0602a88a authored by Connor O'Brien's avatar Connor O'Brien Committed by Android (Google) Code Review
Browse files

Merge "Log less on negative deltas in kernel CPU time readers" into sc-dev

parents 209a1ee0 3f8d3330
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -477,18 +477,17 @@ public abstract class KernelCpuUidTimeReader<T> {
            }
            copyToCurTimes();
            boolean notify = false;
            boolean valid = true;
            for (int i = 0; i < mFreqCount; i++) {
                // Unit is 10ms.
                mDeltaTimes[i] = mCurTimes[i] - lastTimes[i];
                if (mDeltaTimes[i] < 0) {
                    Slog.e(mTag, "Negative delta from freq time for uid: " + uid
                            + ", delta: " + mDeltaTimes[i]);
                    valid = false;
                    return;
                }
                notify |= mDeltaTimes[i] > 0;
            }
            if (notify && valid) {
            if (notify) {
                System.arraycopy(mCurTimes, 0, lastTimes, 0, mFreqCount);
                if (cb != null) {
                    cb.onUidCpuTime(uid, mDeltaTimes);
@@ -826,11 +825,11 @@ public abstract class KernelCpuUidTimeReader<T> {
                if (mDeltaTime[i] < 0) {
                    Slog.e(mTag, "Negative delta from cluster time for uid: " + uid
                            + ", delta: " + mDeltaTime[i]);
                    valid = false;
                    return;
                }
                notify |= mDeltaTime[i] > 0;
            }
            if (notify && valid) {
            if (notify) {
                System.arraycopy(mCurTime, 0, lastTimes, 0, mNumClusters);
                if (cb != null) {
                    cb.onUidCpuTime(uid, mDeltaTime);