Merge "ActivityManagerService: report current and max thrashing levels" into sc-dev

This commit is contained in:
Suren Baghdasaryan
2021-07-23 21:30:10 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ public class LmkdConnection {
* Used to hold the data for the statsd atoms logging * Used to hold the data for the statsd atoms logging
* Must be in sync with statslog.h * Must be in sync with statslog.h
*/ */
private static final int LMKD_REPLY_MAX_SIZE = 214; private static final int LMKD_REPLY_MAX_SIZE = 222;
// connection listener interface // connection listener interface
interface LmkdConnectionListener { interface LmkdConnectionListener {

View File

@@ -64,11 +64,14 @@ public final class LmkdStatsReporter {
final int freeMemKb = inputData.readInt(); final int freeMemKb = inputData.readInt();
final int freeSwapKb = inputData.readInt(); final int freeSwapKb = inputData.readInt();
final int killReason = inputData.readInt(); final int killReason = inputData.readInt();
final int thrashing = inputData.readInt();
final int maxThrashing = inputData.readInt();
final String procName = inputData.readUTF(); final String procName = inputData.readUTF();
FrameworkStatsLog.write(FrameworkStatsLog.LMK_KILL_OCCURRED, uid, procName, oomScore, FrameworkStatsLog.write(FrameworkStatsLog.LMK_KILL_OCCURRED, uid, procName, oomScore,
pgFault, pgMajFault, rssInBytes, cacheInBytes, swapInBytes, processStartTimeNS, pgFault, pgMajFault, rssInBytes, cacheInBytes, swapInBytes, processStartTimeNS,
minOomScore, freeMemKb, freeSwapKb, mapKillReason(killReason)); minOomScore, freeMemKb, freeSwapKb, mapKillReason(killReason), thrashing,
maxThrashing);
} catch (IOException e) { } catch (IOException e) {
Slog.e(TAG, "Invalid buffer data. Failed to log LMK_KILL_OCCURRED"); Slog.e(TAG, "Invalid buffer data. Failed to log LMK_KILL_OCCURRED");
return; return;