Skip to content

rust_binder: add and wire Binder tracepoints

Mohamad Alsadhan lkml rust-for-linux 3 versions – New

Get series with b4
b4 am [email protected] change-id 20260307-rust-binder-trace-c3eb49918deb

Versions newest first

  1. v3 Latest6 patches 0 repliesNew
  2. v23 patches 2 repliesSuperseded
  3. v13 patches 1 replySuperseded

Changes in v3 from the cover letter

- 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/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6rust_binder: remove "rust_" prefix from tracepointsdrivers/android/binder/rust_binder_events.h drivers/android/binder/trace.rs+6 -60 replies
2/6rust_binder: add ioctl/read/write done tracepointsdrivers/android/binder/process.rs drivers/android/binder/rust_binder_events.h drivers/android/binder/thread.rs +1 more+57 -30 replies
3/6rust_binder: add `wait_for_work` tracepointdrivers/android/binder/rust_binder_events.h drivers/android/binder/thread.rs drivers/android/binder/trace.rs+34 -20 replies
4/6rust_binder: add `transaction_received` tracepointdrivers/android/binder/rust_binder_events.h drivers/android/binder/trace.rs drivers/android/binder/transaction.rs+21 -00 replies
5/6rust_binder: add fd translation tracepointsdrivers/android/binder/allocation.rs drivers/android/binder/rust_binder.h drivers/android/binder/rust_binder_events.h +2 more+54 -00 replies
6/6rust_binder: add `command`/`return` tracepointsdrivers/android/binder/rust_binder_events.h drivers/android/binder/rust_binder_main.rs drivers/android/binder/thread.rs +1 more+47 -00 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchAlice Ryhl
1/6R-b
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

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

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})

---
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/[email protected]

Changes in v2:
- Fixed broken formatting artifacts (rustfmtcheck passes now)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
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,

Signature · 1 line
Mohamad Alsadhan <[email protected]>