summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-09 09:42:44 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-07-09 09:42:44 -0700
commit3ff23c46978adfb691507baa3d2bf04b3f5ca001 (patch)
treebec3b275a661e48180a7f4c22f607846ac2ad7aa
parente541ba9e8d79c5965bf6226a50dffcba25551fee (diff)
parentbd51116a5310683f70a37110bf735252dc7e4e38 (diff)
downloadframeworks_base-3ff23c46978adfb691507baa3d2bf04b3f5ca001.zip
frameworks_base-3ff23c46978adfb691507baa3d2bf04b3f5ca001.tar.gz
frameworks_base-3ff23c46978adfb691507baa3d2bf04b3f5ca001.tar.bz2
Merge change 6609
* changes: Fix couple of bugs in the meminfo report. . added the new "/data/dalvik-cache/" to dalvik heap . shortened the starting line's length from 40 to 30 to handle the case where there is no name . fixed the pri/shared for others. It was swapped.
-rw-r--r--core/jni/android_os_Debug.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index a6b63d8..b4c60f1 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -129,6 +129,8 @@ static void read_mapinfo(FILE *fp, stats_t* stats)
isDalvikHeap = 1;
} else if (strstr(line, "/dalvik-heap-bitmap/")) {
isDalvikHeap = 1;
+ } else if (strstr(line, "/data/dalvik-cache/")) {
+ isDalvikHeap = 1;
} else if (strstr(line, "/tmp/sqlite-heap")) {
isSqliteHeap = 1;
}
@@ -158,9 +160,9 @@ static void read_mapinfo(FILE *fp, stats_t* stats)
private_dirty = temp;
} else if (sscanf(line, "Referenced: %d kB", &temp) == 1) {
referenced = temp;
- } else if (strlen(line) > 40 && line[8] == '-' && line[17] == ' ') {
+ } else if (strlen(line) > 30 && line[8] == '-' && line[17] == ' ') {
// looks like a new mapping
- // example: "0000a000-00232000 rwxp 0000a000 00:00 0 [heap]"
+ // example: "10000000-10001000 ---p 10000000 00:00 0"
break;
}
}
@@ -178,8 +180,8 @@ static void read_mapinfo(FILE *fp, stats_t* stats)
// ignore
} else {
stats->otherPss += pss;
- stats->otherPrivateDirty += shared_dirty;
- stats->otherSharedDirty += private_dirty;
+ stats->otherPrivateDirty += private_dirty;
+ stats->otherSharedDirty += shared_dirty;
}
}
}