[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251203-binder-trace1-v1-0-22d3ffddb44e@google.com>
Date: Wed, 03 Dec 2025 14:48:07 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Carlos Llamas <cmllamas@...gle.com>,
Steven Rostedt <rostedt@...dmis.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
"Björn Roy Baron" <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>, "Arve Hjønnevåg" <arve@...roid.com>, Todd Kjos <tkjos@...roid.com>,
Martijn Coenen <maco@...roid.com>, Joel Fernandes <joelagnelf@...dia.com>,
Christian Brauner <brauner@...nel.org>, Suren Baghdasaryan <surenb@...gle.com>, rust-for-linux@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org,
Alice Ryhl <aliceryhl@...gle.com>
Subject: [PATCH 0/2] Access Rust fields from TP_fast_assign in TRACE_EVENT
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@...gle.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 <aliceryhl@...gle.com>
Powered by blists - more mailing lists