Binder Transactions¶
Binder IPC transaction performance profiling.
Overview¶
Binder is Android's inter-process communication mechanism. Slow binder transactions can block the calling thread, causing ANRs and jank. perfetto-cli profiles binder calls to identify latency issues.
Commands¶
binder profile¶
Analyze binder transaction performance.
Options:
| Option | Description | Default |
|---|---|---|
--min-latency <ms> |
Minimum transaction latency to report | 10 |
--group-by <field> |
Group results by: aidl, server, none |
none |
Examples:
# Show only slow transactions (>20ms)
perfetto-cli -t trace.perfetto-trace -p com.example.app binder profile --min-latency 20
# Group by AIDL interface
perfetto-cli -t trace.perfetto-trace -p com.example.app binder profile --group-by aidl
# Group by server process
perfetto-cli -t trace.perfetto-trace -p com.example.app binder profile --group-by server
Workflow¶
- Run
binder profileto see all slow transactions - Use
--group-by aidlto identify which interfaces are slowest - Cross-reference with
cpu utilizationon the server process to understand why
Tips¶
- Binder calls on the main thread with >16ms latency will cause frame drops
- Use
--group-by serverto identify slow system services - Combine with ANR analysis — binder timeouts are a common ANR cause