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

Commit ee455f5a authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "People holding partial wake locks now get blamed for CPU usage." into gingerbread

parents 5872e9d7 0d903a84
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1586,8 +1586,10 @@ public abstract class BatteryStats implements Parcelable {
                        sb.append(prefix); sb.append("      CPU: ");
                                formatTime(sb, userTime); sb.append("usr + ");
                                formatTime(sb, systemTime); sb.append("krn\n");
                        if (starts != 0) {
                            sb.append(prefix); sb.append("      "); sb.append(starts);
                                    sb.append(" proc starts");
                        }
                        pw.println(sb.toString());
                        for (int e=0; e<numExcessive; e++) {
                            Uid.Proc.ExcessiveWake ew = ps.getExcessiveWake(e);
+220 −46

File changed.

Preview size limit exceeded, changes collapsed.

+37 −5

File changed.

Preview size limit exceeded, changes collapsed.

+10 −1
Original line number Diff line number Diff line
@@ -131,6 +131,13 @@ class ProcessRecord {
    void dump(PrintWriter pw, String prefix) {
        final long now = SystemClock.uptimeMillis();

        long wtime;
        synchronized (batteryStats.getBatteryStats()) {
            wtime = batteryStats.getBatteryStats().getProcessWakeTime(info.uid,
                    pid, SystemClock.elapsedRealtime());
        }
        long timeUsed = wtime - lastWakeTime;

        if (info.className != null) {
            pw.print(prefix); pw.print("class="); pw.println(info.className);
        }
@@ -182,7 +189,9 @@ class ProcessRecord {
        pw.print(prefix); pw.print("adjSeq="); pw.print(adjSeq);
                pw.print(" lruSeq="); pw.println(lruSeq);
        pw.print(prefix); pw.print("lastWakeTime="); pw.print(lastWakeTime);
                pw.print(" lastRequestedGc=");
                pw.print(" time used=");
                TimeUtils.formatDuration(timeUsed, pw); pw.println("");
        pw.print(prefix); pw.print("lastRequestedGc=");
                TimeUtils.formatDuration(lastRequestedGc, now, pw);
                pw.print(" lastLowMemory=");
                TimeUtils.formatDuration(lastLowMemory, now, pw);