summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Richard Uhler <ruhler@google.com> 2017-06-23 16:54:25 +0100
committer Thierry Strudel <tstrudel@google.com> 2017-06-26 06:34:04 +0000
commita178205e8bcaf9b4dd75c4618d53d30eb94c8802 (patch)
treec9b40584dc6991b2d59c6395f353baca19735a45
parentf05929af73eaa5f439e7b71de2ac6c1ab0cc9555 (diff)
Fix bug in reporting SwapPss in dumpsys meminfo.
Bug: 29875093 Test: Run dumpsys meminfo -a, verify SwapPss adds up and is non-zero for dalvik and native. Change-Id: I79d0b6a59bf5f4e73f75f0b9540ec0fcc9e23b02
-rw-r--r--core/java/android/app/ActivityThread.java4
-rw-r--r--core/java/android/os/Debug.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 8a8f8dd681fd..204df63f600d 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -2391,13 +2391,13 @@ public final class ActivityThread {
memInfo.nativeSwappablePss, memInfo.nativeSharedDirty,
memInfo.nativePrivateDirty, memInfo.nativeSharedClean,
memInfo.nativePrivateClean, memInfo.hasSwappedOutPss ?
- memInfo.nativeSwappedOut : memInfo.nativeSwappedOutPss,
+ memInfo.nativeSwappedOutPss : memInfo.nativeSwappedOut,
nativeMax, nativeAllocated, nativeFree);
printRow(pw, HEAP_FULL_COLUMN, "Dalvik Heap", memInfo.dalvikPss,
memInfo.dalvikSwappablePss, memInfo.dalvikSharedDirty,
memInfo.dalvikPrivateDirty, memInfo.dalvikSharedClean,
memInfo.dalvikPrivateClean, memInfo.hasSwappedOutPss ?
- memInfo.dalvikSwappedOut : memInfo.dalvikSwappedOutPss,
+ memInfo.dalvikSwappedOutPss : memInfo.dalvikSwappedOut,
dalvikMax, dalvikAllocated, dalvikFree);
} else {
printRow(pw, HEAP_COLUMN, "", "Pss", "Private",
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index fa854b078292..f243f377cb56 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -699,6 +699,7 @@ public final class Debug
dest.writeInt(dalvikPrivateClean);
dest.writeInt(dalvikSharedClean);
dest.writeInt(dalvikSwappedOut);
+ dest.writeInt(dalvikSwappedOutPss);
dest.writeInt(nativePss);
dest.writeInt(nativeSwappablePss);
dest.writeInt(nativePrivateDirty);
@@ -706,6 +707,7 @@ public final class Debug
dest.writeInt(nativePrivateClean);
dest.writeInt(nativeSharedClean);
dest.writeInt(nativeSwappedOut);
+ dest.writeInt(nativeSwappedOutPss);
dest.writeInt(otherPss);
dest.writeInt(otherSwappablePss);
dest.writeInt(otherPrivateDirty);
@@ -726,6 +728,7 @@ public final class Debug
dalvikPrivateClean = source.readInt();
dalvikSharedClean = source.readInt();
dalvikSwappedOut = source.readInt();
+ dalvikSwappedOutPss = source.readInt();
nativePss = source.readInt();
nativeSwappablePss = source.readInt();
nativePrivateDirty = source.readInt();
@@ -733,6 +736,7 @@ public final class Debug
nativePrivateClean = source.readInt();
nativeSharedClean = source.readInt();
nativeSwappedOut = source.readInt();
+ nativeSwappedOutPss = source.readInt();
otherPss = source.readInt();
otherSwappablePss = source.readInt();
otherPrivateDirty = source.readInt();