[PATCH v3 0/6] rust_binder: add and wire Binder tracepoints

From: Mohamad Alsadhan

Date: Tue Mar 17 2026 - 11:04:01 EST


This series adds several missing tracepoints for the Rust Binder
implementation (equivalent to ones already present in C binder)
and wires them into the relevant execution paths.

The first patch adjusts current naming to match the existing userspace
expectationse (e.g. `rust_binder_ioctl` -> `binder_ioctl`).

The rest of the patches each add declarations for a separate
tracepoint category and wire in their calls into the corresponding
Binder execution paths.

Tracepoints added include:
- ioctl entry/exit (`binder_ioctl`, `binder_ioctl_done`)
- command parsing and return writes (`binder_command`,
`binder_return`)
- read/write completion (`binder_read_done`, `binder_write_done`)
- wait (`binder_wait_for_work`)
- transaction (`binder_transaction_received`)
- fd translation (`binder_transaction_fd_{send,recv}`)

Link: https://github.com/Rust-for-Linux/linux/issues/1226
Suggested-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Signed-off-by: Mohamad Alsadhan <mo@xxxxxxx>
---
Changes in v3:
- Reworked series to split by each tracepoint category instead of one
commit for all declarations and one for all calls
- Dropped unneeded buffer/page lifecycle tracepoints
- No functional changes from v2, except the removal of buffer/page
lifecycle tracepoints
- Link to v2: https://lore.kernel.org/r/20260308-rust-binder-trace-v2-0-9e38637a2193@xxxxxxx

Changes in v2:
- Fixed broken formatting artifacts (rustfmtcheck passes now)
- Link to v1: https://lore.kernel.org/r/20260307-rust-binder-trace-v1-0-5e03283c6e53@xxxxxxx

---
Mohamad Alsadhan (6):
rust_binder: remove "rust_" prefix from tracepoints
rust_binder: add ioctl/read/write done tracepoints
rust_binder: add `wait_for_work` tracepoint
rust_binder: add `transaction_received` tracepoint
rust_binder: add fd translation tracepoints
rust_binder: add `command`/`return` tracepoints

drivers/android/binder/allocation.rs | 1 +
drivers/android/binder/process.rs | 7 +-
drivers/android/binder/rust_binder.h | 5 ++
drivers/android/binder/rust_binder_events.h | 121 +++++++++++++++++++++++++++-
drivers/android/binder/rust_binder_main.rs | 1 +
drivers/android/binder/thread.rs | 15 +++-
drivers/android/binder/trace.rs | 78 ++++++++++++++++--
drivers/android/binder/transaction.rs | 2 +
8 files changed, 219 insertions(+), 11 deletions(-)
---
base-commit: 11439c4635edd669ae435eec308f4ab8a0804808
change-id: 20260307-rust-binder-trace-c3eb49918deb

Best regards,
--
Mohamad Alsadhan <mo@xxxxxxx>