summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-11-11 12:22:36 -0800
committerDianne Hackborn <hackbod@google.com>2014-11-12 21:56:30 +0000
commitfabb70b2efbd125f74923d19ab12bc8e1371ed1f (patch)
tree91602447d9cba72fd6894e6478c73284a3eb607f /core/jni
parent41a8043b30a289bdba55a2469e598b3fe67c3bf1 (diff)
downloadframeworks_base-fabb70b2efbd125f74923d19ab12bc8e1371ed1f.zip
frameworks_base-fabb70b2efbd125f74923d19ab12bc8e1371ed1f.tar.gz
frameworks_base-fabb70b2efbd125f74923d19ab12bc8e1371ed1f.tar.bz2
Add reporting of Parcel memory/count.
Also fix issue #18340771: Dumpsys Procstats missing a newline Change-Id: I0c612187a3fb4d7eeafbf97d373efdef732c477e
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_os_Parcel.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/jni/android_os_Parcel.cpp b/core/jni/android_os_Parcel.cpp
index 44863cc..960acc0 100644
--- a/core/jni/android_os_Parcel.cpp
+++ b/core/jni/android_os_Parcel.cpp
@@ -688,6 +688,16 @@ static void android_os_Parcel_enforceInterface(JNIEnv* env, jclass clazz, jlong
"Binder invocation to an incorrect interface");
}
+static jlong android_os_Parcel_getGlobalAllocSize(JNIEnv* env, jclass clazz)
+{
+ return Parcel::getGlobalAllocSize();
+}
+
+static jlong android_os_Parcel_getGlobalAllocCount(JNIEnv* env, jclass clazz)
+{
+ return Parcel::getGlobalAllocCount();
+}
+
// ----------------------------------------------------------------------------
static const JNINativeMethod gParcelMethods[] = {
@@ -737,6 +747,9 @@ static const JNINativeMethod gParcelMethods[] = {
{"nativeHasFileDescriptors", "(J)Z", (void*)android_os_Parcel_hasFileDescriptors},
{"nativeWriteInterfaceToken", "(JLjava/lang/String;)V", (void*)android_os_Parcel_writeInterfaceToken},
{"nativeEnforceInterface", "(JLjava/lang/String;)V", (void*)android_os_Parcel_enforceInterface},
+
+ {"getGlobalAllocSize", "()J", (void*)android_os_Parcel_getGlobalAllocSize},
+ {"getGlobalAllocCount", "()J", (void*)android_os_Parcel_getGlobalAllocCount},
};
const char* const kParcelPathName = "android/os/Parcel";