Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b9fc471 authored by Philip Cuadra's avatar Philip Cuadra Committed by Android (Google) Code Review
Browse files

Merge "Binder: add pid to thread name for binder threads." into nyc-dev

parents ad798d03 a082fa8a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;
}