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.

firewire: core: add tracepoints events for flushing completions of isochronous context

It is helpful to trace the flushing completions of isochronous context when
the core function is requested them by both in-kernel unit drivers and
userspace applications.

This commit adds some tracepoints events for the aim.

Link: https://lore.kernel.org/r/20240623220859.851685-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

+42
+4
drivers/firewire/core-iso.c
··· 207 207 208 208 int fw_iso_context_flush_completions(struct fw_iso_context *ctx) 209 209 { 210 + trace_isoc_outbound_flush_completions(ctx); 211 + trace_isoc_inbound_single_flush_completions(ctx); 212 + trace_isoc_inbound_multiple_flush_completions(ctx); 213 + 210 214 return ctx->card->driver->flush_iso_completions(ctx); 211 215 } 212 216 EXPORT_SYMBOL(fw_iso_context_flush_completions);
+2
drivers/firewire/ohci.c
··· 43 43 #include "packet-header-definitions.h" 44 44 #include "phy-packet-definitions.h" 45 45 46 + #include <trace/events/firewire.h> 47 + 46 48 #define ohci_info(ohci, f, args...) dev_info(ohci->card.device, f, ##args) 47 49 #define ohci_notice(ohci, f, args...) dev_notice(ohci->card.device, f, ##args) 48 50 #define ohci_err(ohci, f, args...) dev_err(ohci->card.device, f, ##args)
+36
include/trace/events/firewire.h
··· 706 706 TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL) 707 707 ); 708 708 709 + DECLARE_EVENT_CLASS(isoc_flush_completions_template, 710 + TP_PROTO(const struct fw_iso_context *ctx), 711 + TP_ARGS(ctx), 712 + TP_STRUCT__entry( 713 + __field(u64, context) 714 + __field(u8, card_index) 715 + ), 716 + TP_fast_assign( 717 + __entry->context = (uintptr_t)ctx; 718 + __entry->card_index = ctx->card->index; 719 + ), 720 + TP_printk( 721 + "context=0x%llx card_index=%u", 722 + __entry->context, 723 + __entry->card_index 724 + ) 725 + ); 726 + 727 + DEFINE_EVENT_CONDITION(isoc_flush_completions_template, isoc_outbound_flush_completions, 728 + TP_PROTO(const struct fw_iso_context *ctx), 729 + TP_ARGS(ctx), 730 + TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT) 731 + ); 732 + 733 + DEFINE_EVENT_CONDITION(isoc_flush_completions_template, isoc_inbound_single_flush_completions, 734 + TP_PROTO(const struct fw_iso_context *ctx), 735 + TP_ARGS(ctx), 736 + TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE) 737 + ); 738 + 739 + DEFINE_EVENT_CONDITION(isoc_flush_completions_template, isoc_inbound_multiple_flush_completions, 740 + TP_PROTO(const struct fw_iso_context *ctx), 741 + TP_ARGS(ctx), 742 + TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL) 743 + ); 744 + 709 745 #undef QUADLET_SIZE 710 746 711 747 #endif // _FIREWIRE_TRACE_EVENT_H