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

Commit f4e1b7f1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add an abbreviated tracepoint for freeze state." into main

parents d7b5186b 0b76feea
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -4107,6 +4107,7 @@ public class OomAdjuster {
            return;
        }

        final boolean freezePolicy = getFreezePolicy(app);
        final ProcessCachedOptimizerRecord opt = app.mOptRecord;
        final ProcessStateRecord state = app.mState;
        if (Flags.traceUpdateAppFreezeStateLsp()) {
@@ -4122,6 +4123,21 @@ public class OomAdjuster {
            final boolean cpuCapabilityChanged = hasCpuCapability != usedToHaveCpuCapability;
            if ((oomAdjChanged || shouldNotFreezeChanged || cpuCapabilityChanged)
                    && Trace.isTagEnabled(Trace.TRACE_TAG_ACTIVITY_MANAGER)) {
                Trace.instantForTrack(Trace.TRACE_TAG_ACTIVITY_MANAGER,
                        "FreezeLite",
                        (opt.isFrozen() ? "F" : "-")
                        + (opt.isPendingFreeze() ? "P" : "-")
                        + (opt.isFreezeExempt() ? "E" : "-")
                        + (opt.shouldNotFreeze() ? "N" : "-")
                        + (hasCpuCapability ? "T" : "-")
                        + (immediate ? "I" : "-")
                        + (freezePolicy ? "Z" : "-")
                        + (Flags.useCpuTimeCapability() ? "t" : "-")
                        + (Flags.prototypeAggressiveFreezing() ? "a" : "-")
                        + "/" + app.getPid()
                        + "/" + state.getCurAdj()
                        + "/" + oldOomAdj
                        + "/" + opt.shouldNotFreezeReason());
                Trace.instantForTrack(Trace.TRACE_TAG_ACTIVITY_MANAGER,
                        CachedAppOptimizer.ATRACE_FREEZER_TRACK,
                        "updateAppFreezeStateLSP " + app.processName
@@ -4137,7 +4153,7 @@ public class OomAdjuster {
            }
        }

        if (getFreezePolicy(app)) {
        if (freezePolicy) {
            // This process should be frozen.
            if (immediate && !opt.isFrozen()) {
                // And it will be frozen immediately.