binder学习笔记——binder trace
2022/8/1 23:22:45
本文主要是介绍binder学习笔记——binder trace,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
1. 异步binder trace打印
(1) 异步binder发送端显示:
Name binder transaction async Category binder Start time 17s 455ms 421us 82ns Duration 0s Thread surfaceflinger 2731 Process /system/bin/surfaceflinger 1606 User ID 1000 Slice ID 286208 flags 0x11 this is a one-way call: async, no return; allow replies with file descriptors; code 0x01 Java Layer Dependent transaction id 7414482 destination node 56653 destination process 3713 reply transaction? false calling tid 2731 type internal_slice depth 0 stack_id 8598901110785906 parent_stack_id 0 parent_id null arg_set_id 373693
(2) 异步binder接收端显示:
Name binder async rcv Category binder Start time 17s 483ms 700us 666ns Duration 0s Thread binder:4128_3 4209 Process com.android.launcher 4128 User ID 10178 Slice ID 288578 flags 0x11 this is a one-way call: async, no return; allow replies with file descriptors; code 0x01 Java Layer Dependent transaction id 7414483 destination node 36400 destination process 4128 reply transaction? false calling tid 2731 type internal_slice depth 0 stack_id 1717227819666250 parent_stack_id 0 parent_id null arg_set_id 373985
(3) 根据 "transaction id 7414483" 找到对应trace:
surfaceflinger-2731 ( 1606) [000] .... 69136.712199: binder_transaction: transaction=7414483 dest_node=36400 dest_proc=4128 dest_thread=0 reply=0 flags=0x11 code=0x1 binder:4128_3-4209 ( 4128) [005] .... 69136.740323: binder_transaction_received: transaction=7414483
(4) trace代码位置
binder_transaction trace_binder_transaction(reply, t, target_node); //运行在异步binder发送端进程上下文 binder_thread_read trace_binder_transaction_received(t); //运行在异步binder接收端进程上下文
(5) 按"{" "}" 键在异步binder的发送端和接收端跳转。
这篇关于binder学习笔记——binder trace的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-26RocketMQ入门指南:搭建与使用全流程详解
- 2024-11-26RocketMQ入门教程:轻松搭建与使用指南
- 2024-11-26手写RocketMQ:从入门到实践的简单教程
- 2024-11-25【机器学习(二)】分类和回归任务-决策树(Decision Tree,DT)算法-Sentosa_DSML社区版
- 2024-11-23增量更新怎么做?-icode9专业技术文章分享
- 2024-11-23压缩包加密方案有哪些?-icode9专业技术文章分享
- 2024-11-23用shell怎么写一个开机时自动同步远程仓库的代码?-icode9专业技术文章分享
- 2024-11-23webman可以同步自己的仓库吗?-icode9专业技术文章分享
- 2024-11-23在 Webman 中怎么判断是否有某命令进程正在运行?-icode9专业技术文章分享
- 2024-11-23如何重置new Swiper?-icode9专业技术文章分享