fix Uss accounting in getPssPid()

Change-Id: I0d1dc81d127afbf3a7d7b4b86865ccb0e8bd7d4c
Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
Iliyan Malchev
2014-12-11 14:29:36 -08:00
parent 4841a787b3
commit 45838de942

View File

@@ -528,8 +528,8 @@ static jlong android_os_Debug_getPssPid(JNIEnv *env, jobject clazz, jint pid, jl
c++;
}
pss += atoi(c);
} else if (strncmp(line, "Private_Clean:", 14)
|| strncmp(line, "Private_Dirty:", 14)) {
} else if (strncmp(line, "Private_Clean:", 14) == 0
|| strncmp(line, "Private_Dirty:", 14) == 0) {
char* c = line + 14;
while (*c != 0 && (*c < '0' || *c > '9')) {
c++;