diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-11-12 16:36:49 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-12 16:36:49 +0000 |
commit | 00326f6409ef390305822b5b84b3ae61b660e6fb (patch) | |
tree | cbb6c52cc3e5c413122c3eccab91b70dd52509e3 /include | |
parent | d2af15668826604036f60eb6348ece330e5420e3 (diff) | |
parent | ba2e1a332eb24fcf4eef3634b8233d1681fd1309 (diff) | |
download | frameworks_native-00326f6409ef390305822b5b84b3ae61b660e6fb.zip frameworks_native-00326f6409ef390305822b5b84b3ae61b660e6fb.tar.gz frameworks_native-00326f6409ef390305822b5b84b3ae61b660e6fb.tar.bz2 |
am ba2e1a33: am ca69e8f2: Merge "Add tracking of parcel memory allocations." into lmp-mr1-dev
* commit 'ba2e1a332eb24fcf4eef3634b8233d1681fd1309':
Add tracking of parcel memory allocations.
Diffstat (limited to 'include')
-rw-r--r-- | include/binder/Parcel.h | 6 | ||||
-rw-r--r-- | include/private/binder/Static.h | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h index 2ee99f8..6a69761 100644 --- a/include/binder/Parcel.h +++ b/include/binder/Parcel.h @@ -205,7 +205,11 @@ public: // Explicitly close all file descriptors in the parcel. void closeFileDescriptors(); - + + // Debugging: get metrics on current allocations. + static size_t getGlobalAllocSize(); + static size_t getGlobalAllocCount(); + private: typedef void (*release_func)(Parcel* parcel, const uint8_t* data, size_t dataSize, diff --git a/include/private/binder/Static.h b/include/private/binder/Static.h index 6a03594..eeb37d7 100644 --- a/include/private/binder/Static.h +++ b/include/private/binder/Static.h @@ -34,7 +34,12 @@ extern Vector<int32_t> gTextBuffers; extern Mutex gProcessMutex; extern sp<ProcessState> gProcess; -// For ServiceManager.cpp +// For Parcel.cpp +extern Mutex gParcelGlobalAllocSizeLock; +extern size_t gParcelGlobalAllocSize; +extern size_t gParcelGlobalAllocCount; + +// For IServiceManager.cpp extern Mutex gDefaultServiceManagerLock; extern sp<IServiceManager> gDefaultServiceManager; extern sp<IPermissionController> gPermissionController; |