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

Commit 885c21b0 authored by Ben Murdoch's avatar Ben Murdoch
Browse files

Log the correct oom_adj when compacting apps.

The useful oom_adj value for app compaction logging is the
previous score, not the upcoming score. We were logging the wrong
value.

Test: verified through event log that values in logs look right.
Bug: 128682578
Change-Id: I7f9554802dac7b4f47579869adb851bc06239ba6
parent c943ffba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4913,7 +4913,7 @@ message AppCompacted {
  // since boot, not including sleep (see SystemClock.uptimeMillis()).
  optional int64 last_compact_timestamp_ms_since_boot = 14;

  // The oom_score_adj at the time of compaction.
  // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction.
  optional int32 oom_score_adj = 15;

  // The process state at the time of compaction.
+2 −2
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ public final class AppCompactor {
        mPendingCompactionProcesses.add(app);
        mCompactionHandler.sendMessage(
            mCompactionHandler.obtainMessage(
                COMPACT_PROCESS_MSG, app.curAdj, app.setProcState));
                COMPACT_PROCESS_MSG, app.setAdj, app.setProcState));
    }

    @GuardedBy("mAm")
@@ -220,7 +220,7 @@ public final class AppCompactor {
        mPendingCompactionProcesses.add(app);
        mCompactionHandler.sendMessage(
            mCompactionHandler.obtainMessage(
                COMPACT_PROCESS_MSG, app.curAdj, app.setProcState));
                COMPACT_PROCESS_MSG, app.setAdj, app.setProcState));

    }