Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

binder: add tracepoint for netlink reports

Add a tracepoint to capture the same details that are being sent through
the generic netlink interface during transaction failures. This provides
a useful debugging tool to observe the events independently from the
netlink listeners.

Signed-off-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20250727182932.2499194-6-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Carlos Llamas and committed by
Greg Kroah-Hartman
8a61a53b f37b55de

+39
+2
drivers/android/binder.c
··· 3014 3014 BINDER_NLGRP_REPORT)) 3015 3015 return; 3016 3016 3017 + trace_binder_netlink_report(context, t, data_size, error); 3018 + 3017 3019 skb = genlmsg_new(GENLMSG_DEFAULT_SIZE, GFP_KERNEL); 3018 3020 if (!skb) 3019 3021 return;
+37
drivers/android/binder_trace.h
··· 402 402 "unknown") 403 403 ); 404 404 405 + TRACE_EVENT(binder_netlink_report, 406 + TP_PROTO(const char *context, 407 + struct binder_transaction *t, 408 + u32 data_size, 409 + u32 error), 410 + TP_ARGS(context, t, data_size, error), 411 + TP_STRUCT__entry( 412 + __field(const char *, context) 413 + __field(u32, error) 414 + __field(int, from_pid) 415 + __field(int, from_tid) 416 + __field(int, to_pid) 417 + __field(int, to_tid) 418 + __field(bool, is_reply) 419 + __field(unsigned int, flags) 420 + __field(unsigned int, code) 421 + __field(size_t, data_size) 422 + ), 423 + TP_fast_assign( 424 + __entry->context = context; 425 + __entry->error = error; 426 + __entry->from_pid = t->from_pid; 427 + __entry->from_tid = t->from_tid; 428 + __entry->to_pid = t->to_proc ? t->to_proc->pid : 0; 429 + __entry->to_tid = t->to_thread ? t->to_thread->pid : 0; 430 + __entry->is_reply = t->is_reply; 431 + __entry->flags = t->flags; 432 + __entry->code = t->code; 433 + __entry->data_size = data_size; 434 + ), 435 + TP_printk("from %d:%d to %d:%d context=%s error=%d is_reply=%d flags=0x%x code=0x%x size=%zu", 436 + __entry->from_pid, __entry->from_tid, 437 + __entry->to_pid, __entry->to_tid, 438 + __entry->context, __entry->error, __entry->is_reply, 439 + __entry->flags, __entry->code, __entry->data_size) 440 + ); 441 + 405 442 #endif /* _BINDER_TRACE_H */ 406 443 407 444 #undef TRACE_INCLUDE_PATH