Binder 大小
#Binder线程数量#
SystemServer 32个
App 16个
搜索binder thread pool:
E IPCThreadState: binder thread pool (15 threads) starved for (appbinder线程被用光,
E IPCThreadState: binder thread pool (31 threads) starved for 108 ms (SystemServer binder线程被用光,等待了108ms "Waiting for thread to be free"
#Binder 1次最大数量传输量#
默认1个进程最多分配1M - 8k的binder内核缓存大小,oneway异步分配1M - 8k/2
#define BINDER_VM_SIZE ((1*1024*1024) - (4096 *2)) // 1M - 8k
修改BINDER_VM_SIZE可以改变大小,但是最大是4M
ProcessState::ProcessState(): mDriverFD(open_driver())
, mVMStart(MAP_FAILED)
, mThreadCountLock(PTHREAD_MUTEX_INITIALIZER)
, mThreadCountDecrement(PTHREAD_COND_INITIALIZER)
, mExecutingThreadsCount(0)
, mMaxThreads(DEFAULT_MAX_BINDER_THREADS)
, mStarvationStartTimeMs(0)
, mManagesContexts(false)
, mBinderContextCheckFunc(NULL)
, mBinderContextUserData(NULL)
, mThreadPoolStarted(false)
, mThreadPoolSeq(1)
{
mVMStart = mmap(0, BINDER_VM_SIZE
#Binder 最大数量#
6000个,
Too many Binders sent to SYSTEM (Android能创建的Binder数量的最大值超过6000,非systemuid的binder调用会被kill掉,如果没等到binder调用返回,就不断发起新的binder调用就会抛出Proxy Binders异常