Re: [PATCH 2/2] rust_binder: add binder_transaction tracepoint

From: Carlos Llamas

Date: Tue Jan 27 2026 - 13:33:17 EST


On Wed, Dec 03, 2025 at 02:48:09PM +0000, Alice Ryhl wrote:
> This patch adds the binder_transaction tracepoint to Rust Binder. This
> was chosen as the next tracepoint to add as it is the most complex
> tracepoint. (And it's also an important tracepoint known to perfetto.)
>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> ---

This approach seems to work well considering the limitations. I wonder
though if it would be more practical to simply pass the individual
primitive values used by TP_prinkt() from the start? I suppose the
downside would be the extra overhead with the tracepoints disabled.
However, this might be neglectable and the solution much simpler?

> +static inline rust_binder_node rust_binder_transaction_target_node(rust_binder_transaction t)
> +{
> + void *p = *(void **) (t + RUST_BINDER_LAYOUT.t.target_node);
> +
> + if (p)
> + p = p + RUST_BINDER_LAYOUT.n.arc_offset;
> + return NULL;

It looks like this should have 'return p' right? Sorry for the late
review this has been picked up so we might need a fixes for this.

--
Carlos Llamas