Loading core/java/com/android/internal/os/logging/MetricsLoggerWrapper.java +19 −14 Original line number Diff line number Diff line Loading @@ -16,16 +16,17 @@ package com.android.internal.os.logging; import android.app.Application; import android.os.Process; import android.util.Log; import android.view.WindowManager.LayoutParams; import com.android.internal.os.ProcfsMemoryUtil; import com.android.internal.util.FrameworkStatsLog; import java.util.Collection; import libcore.util.NativeAllocationRegistry; import java.util.Collection; /** * Used to wrap different logging calls in one, so that client side code base is clean and more * readable. Loading Loading @@ -84,6 +85,7 @@ public class MetricsLoggerWrapper { ProcfsMemoryUtil.MemorySnapshot m = ProcfsMemoryUtil.readMemorySnapshotFromProcfs(); int oom_score_adj = ProcfsMemoryUtil.readOomScoreAdjFromProcfs(); Runtime runtime = Runtime.getRuntime(); FrameworkStatsLog.write(FrameworkStatsLog.POSTGC_MEMORY_SNAPSHOT, m.uid, processName, pid, oom_score_adj, Loading @@ -95,6 +97,9 @@ public class MetricsLoggerWrapper { mallocedCount, mallocedBytes, nonmallocedCount, nonmallocedBytes); nonmallocedBytes, runtime.freeMemory(), runtime.totalMemory(), runtime.maxMemory()); } } Loading
core/java/com/android/internal/os/logging/MetricsLoggerWrapper.java +19 −14 Original line number Diff line number Diff line Loading @@ -16,16 +16,17 @@ package com.android.internal.os.logging; import android.app.Application; import android.os.Process; import android.util.Log; import android.view.WindowManager.LayoutParams; import com.android.internal.os.ProcfsMemoryUtil; import com.android.internal.util.FrameworkStatsLog; import java.util.Collection; import libcore.util.NativeAllocationRegistry; import java.util.Collection; /** * Used to wrap different logging calls in one, so that client side code base is clean and more * readable. Loading Loading @@ -84,6 +85,7 @@ public class MetricsLoggerWrapper { ProcfsMemoryUtil.MemorySnapshot m = ProcfsMemoryUtil.readMemorySnapshotFromProcfs(); int oom_score_adj = ProcfsMemoryUtil.readOomScoreAdjFromProcfs(); Runtime runtime = Runtime.getRuntime(); FrameworkStatsLog.write(FrameworkStatsLog.POSTGC_MEMORY_SNAPSHOT, m.uid, processName, pid, oom_score_adj, Loading @@ -95,6 +97,9 @@ public class MetricsLoggerWrapper { mallocedCount, mallocedBytes, nonmallocedCount, nonmallocedBytes); nonmallocedBytes, runtime.freeMemory(), runtime.totalMemory(), runtime.maxMemory()); } }