summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Philip Cuadra <philipcuadra@google.com> 2016-04-13 18:27:59 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-04-13 18:27:59 +0000
commit9b9fc47133756806e02bf2d0c8798b98be3ad968 (patch)
tree9c6e291523bec3726c189ed10f5f859f0bf149ab /libs/binder/ProcessState.cpp
parentad798d03beb54e575abb693f3790c4e3855f32d4 (diff)
parenta082fa8a6bd4303d5a5921133746f9e2856ab0d4 (diff)
Merge "Binder: add pid to thread name for binder threads." into nyc-dev
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r--libs/binder/ProcessState.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 33fe26cfa9..b221e51811 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -40,12 +40,12 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
+#include <sys/types.h>
#define BINDER_VM_SIZE ((1*1024*1024) - (4096 *2))
#define DEFAULT_MAX_BINDER_THREADS 15
-
-// ---------------------------------------------------------------------------
+// -------------------------------------------------------------------------
namespace android {
@@ -278,8 +278,9 @@ void ProcessState::expungeHandle(int32_t handle, IBinder* binder)
String8 ProcessState::makeBinderThreadName() {
int32_t s = android_atomic_add(1, &mThreadPoolSeq);
+ pid_t pid = getpid();
String8 name;
- name.appendFormat("Binder_%X", s);
+ name.appendFormat("Binder:%d_%X", pid, s);
return name;
}