Binder 日志解读

Scout 日志增强的Binder 日志信息

  1. Scout binder 传输日志最基本格式
outgoing transaction:  from {from_pid}:{from_tid}  to {to_pid}:{to_tid}  context:{binder/hwbinder}  code:{code id} duration:{duration_time} s
incoming transaction:  from {from_pid}:{from_tid}  to {to_pid}:{to_tid}  context:{binder/hwbinder}  code:{code id} duration:{duration_time} s
pending transaction:  from {from_pid}:{from_tid}  to {to_pid}:{to_tid}  context:{binder/hwbinder}  code:{code id} duration:{duration_time} s
pending async transaction:  from {from_pid}:{from_tid}  to {to_pid}:{to_tid}  context:{binder/hwbinder}  code:{code id} duration:{duration_time} s
 
  • outgoing transaction 是来自outgoing transaction 是来自binder 调用Client端的信息,代表自己去同步调用进程(to_pid)
  • incoming transaction 是来自binder 调用Server端的信息 代表进程(from_pid) 同步调用自己
  • pending transaction 是来自binder 调用Server端的信息,代表因为自己binder线程满,而无法处理的来自其他进程的调用,而显示这些等待的调用信息,只有同步Binder调用会显示
  • pending async transaction 是来自binder 调用Server端的信息,代表因为自己当前处理异步Binder线程被占用(一个进程同一时刻只有一个Binder线程能处理异步Binder传输(oneway)),而无法处理的来自其他进程的异步Binder调用(oneway)
  • from_pid 该次Binder 调用,client端的进程pid
  • from_tid 该次Binder 调用,client端的线程tid
  • to_pid 该次Binder 调用,server端的进程pid
  • to_tid 该次Binder 调用,server端的线程tid
  • context 只有binder/hwbinder,代表通过哪种Binder方式 执行快跨进程调用,一般hal层以上进程间使用binder,system层和Hal 层使用Hidl (hwbinder)通信
  • code 该次Binder 调用执行的函数id,一般AIDL文件从上到下数函数的顺序,从1开始
  • duration 该次Binder 调用,从client 发起,到当前时间点的间隔耗时,单位是sbinder 调用Client端的信息,代表自己去同步调用进程(to_pid)
  • incoming transaction 是来自binder 调用Server端的信息 代表进程(from_pid) 同步调用自己
  • pending transaction 是来自binder 调用Server端的信息,代表因为自己binder线程满,而无法处理的来自其他进程的调用,而显示这些等待的调用信息,只有同步Binder调用会显示
  • pending async transaction 是来自binder 调用Server端的信息,代表因为自己当前处理异步Binder线程被占用(一个进程同一时刻只有一个Binder线程能处理异步Binder传输(oneway)),而无法处理的来自其他进程的异步Binder调用(oneway)
  • from_pid 该次Binder 调用,client端的进程pid
  • from_tid 该次Binder 调用,client端的线程tid
  • to_pid 该次Binder 调用,server端的进程pid
  • to_tid 该次Binder 调用,server端的线程tid
  • context 只有binder/hwbinder,代表通过哪种Binder方式 执行快跨进程调用,一般hal层以上进程间使用binder,system层和Hal 层使用Hidl (hwbinder)通信
  • code 该次Binder 调用执行的函数id,一般AIDL文件从上到下数函数的顺序,从1开始
  • duration 该次Binder 调用,从client 发起,到当前时间点的间隔耗时,单位是s