summaryrefslogtreecommitdiff
path: root/libs/binder/Debug.cpp
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2017-07-13 19:41:25 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-07-13 19:41:25 +0000
commit4bd6f567d5f34d53da199e22141bd37ad7dd9e83 (patch)
tree9e7bde98cefd02c4388295fe05d5f2bda877c79e /libs/binder/Debug.cpp
parent8e661076b670c4fa8e43b5832fffe8ace47c921e (diff)
parent0fb888d052ae9d889ecc03a6ea5a62576131c9f0 (diff)
Merge "Add getBinderKernelReferences"
Diffstat (limited to 'libs/binder/Debug.cpp')
-rw-r--r--libs/binder/Debug.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/binder/Debug.cpp b/libs/binder/Debug.cpp
index a8f2da5ba5..4ac61a3007 100644
--- a/libs/binder/Debug.cpp
+++ b/libs/binder/Debug.cpp
@@ -15,6 +15,7 @@
*/
#include <binder/Debug.h>
+#include <binder/ProcessState.h>
#include <utils/misc.h>
@@ -294,5 +295,14 @@ void printHexData(int32_t indent, const void *buf, size_t length,
}
}
+ssize_t getBinderKernelReferences(size_t count, uintptr_t* buf) {
+ sp<ProcessState> proc = ProcessState::selfOrNull();
+ if (proc.get() == NULL) {
+ return 0;
+ }
+
+ return proc->getKernelReferences(count, buf);
+}
+
}; // namespace android