[PATCH 0/2] Access Rust fields from TP_fast_assign in TRACE_EVENT

From
Alice Ryhl <aliceryhl@google.com>
Date
2025-12-03 14:48:20
Also in
lkml, rust-for-linux
This patch shows one possible mechanism for accessing Rust fields from
the TP_fast_assign() body of a trace event. The idea is to have the
driver expose the offsets of the relevant fields, and to have the C code
use those offsets to access the data.

I'm currently using this mechanism in the Rust Binder driver on
Android's fork of 6.12.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Alice Ryhl (2):
      rust: sync: add Arc::DATA_OFFSET
      rust_binder: add binder_transaction tracepoint

 drivers/android/binder/node.rs              |  8 +++
 drivers/android/binder/process.rs           |  7 +++
 drivers/android/binder/rust_binder.h        | 79 +++++++++++++++++++++++++++++
 drivers/android/binder/rust_binder_events.h | 30 +++++++++++
 drivers/android/binder/rust_binder_main.rs  |  8 +++
 drivers/android/binder/thread.rs            |  1 +
 drivers/android/binder/trace.rs             | 21 ++++++++
 drivers/android/binder/transaction.rs       | 14 +++++
 rust/kernel/sync/arc.rs                     |  3 ++
 9 files changed, 171 insertions(+)
---
base-commit: 211ddde0823f1442e4ad052a2f30f050145ccada
change-id: 20251113-binder-trace1-b2d369f63e30

Best regards,
-- 
Alice Ryhl [off-list ref]
Thread (6 messages) 6 messages, 3 authors, last reply 2026-01-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help