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-05-15PingCAP 黄东旭参与 CCF 秀湖会议,共探开源教育未来
- 2024-05-13PingCAP 戴涛:构建面向未来的金融核心系统
- 2024-05-09flutter3.x_macos桌面os实战
- 2024-05-09Rust中的并发性:Sync 和 Send Traits
- 2024-05-08使用Ollama和OpenWebUI在CPU上玩转Meta Llama3-8B
- 2024-05-08完工标准(DoD)与验收条件(AC)究竟有什么不同?
- 2024-05-084万 star 的 NocoDB 在 sealos 上一键起,轻松把数据库编程智能表格
- 2024-05-08Mac 版Stable Diffusion WebUI的安装
- 2024-05-08解锁CodeGeeX智能问答中3项独有的隐藏技能
- 2024-05-08RAG算法优化+新增代码仓库支持,CodeGeeX的@repo功能效果提升