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

Commit 03a02f6c authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Add detailed log for unexpected cpu_time state

Flag: EXEMPT DEBUG
Test: Manually check logcat

Bug: 440491172
Change-Id: I138a9528f2016ce378c0dad6ce70aa91fe6bbec8
parent 03d34427
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -2677,6 +2677,23 @@ public abstract class OomAdjuster {

        // TODO: b/425766486 - Consider how to pass ProcessRecordInternal to CachedAppOptimizer.
        if (freezePolicy) {
            if (Flags.cpuTimeCapabilityBasedFreezePolicy()
                    && app.getCurAdj() < CACHED_APP_MIN_ADJ) {
                Slog.wtfStack(TAG, "Non-cached process may get frozen soon: "
                        + " name: " + app.processName
                        + " curAdj: " + app.getCurAdj()
                        + " oldOomAdj: " + oldOomAdj
                        + " curRawAdj: " + app.getCurRawAdj()
                        + " maxAdj: " + app.getMaxAdj()
                        + " adjType: " + app.getAdjType()
                        + " adjTarget: " + app.getAdjTarget()
                        + " adjSource: " + app.getAdjSource()
                        + " adjSourcePrcState: " + app.getAdjSourceProcState()
                        + " serviceB: " + app.isServiceB()
                        + " curProcState: " + app.getCurProcState()
                        + " curRawProcState: " + app.getCurRawProcState()
                        + " curSchedGroup: " + app.getCurrentSchedulingGroup());
            }
            // This process should be frozen.
            if (immediate && !app.isFrozen()) {
                // And it will be frozen immediately.