OSDN Git Service

fix Uss accounting in getPssPid()
authorIliyan Malchev <malchev@google.com>
Thu, 11 Dec 2014 22:29:36 +0000 (14:29 -0800)
committerIliyan Malchev <malchev@google.com>
Fri, 12 Dec 2014 00:20:24 +0000 (00:20 +0000)
Change-Id: I0d1dc81d127afbf3a7d7b4b86865ccb0e8bd7d4c
Signed-off-by: Iliyan Malchev <malchev@google.com>
core/jni/android_os_Debug.cpp

index 5a32718..d9e64c7 100644 (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++;