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 of isochronous context

It is helpful to trace the flushing 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-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

+40
+4
drivers/firewire/core-iso.c
··· 197 197 198 198 void fw_iso_context_queue_flush(struct fw_iso_context *ctx) 199 199 { 200 + trace_isoc_outbound_flush(ctx); 201 + trace_isoc_inbound_single_flush(ctx); 202 + trace_isoc_inbound_multiple_flush(ctx); 203 + 200 204 ctx->card->driver->flush_queue_iso(ctx); 201 205 } 202 206 EXPORT_SYMBOL(fw_iso_context_queue_flush);
+36
include/trace/events/firewire.h
··· 670 670 TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL) 671 671 ); 672 672 673 + DECLARE_EVENT_CLASS(isoc_flush_template, 674 + TP_PROTO(const struct fw_iso_context *ctx), 675 + TP_ARGS(ctx), 676 + TP_STRUCT__entry( 677 + __field(u64, context) 678 + __field(u8, card_index) 679 + ), 680 + TP_fast_assign( 681 + __entry->context = (uintptr_t)ctx; 682 + __entry->card_index = ctx->card->index; 683 + ), 684 + TP_printk( 685 + "context=0x%llx card_index=%u", 686 + __entry->context, 687 + __entry->card_index 688 + ) 689 + ); 690 + 691 + DEFINE_EVENT_CONDITION(isoc_flush_template, isoc_outbound_flush, 692 + TP_PROTO(const struct fw_iso_context *ctx), 693 + TP_ARGS(ctx), 694 + TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT) 695 + ); 696 + 697 + DEFINE_EVENT_CONDITION(isoc_flush_template, isoc_inbound_single_flush, 698 + TP_PROTO(const struct fw_iso_context *ctx), 699 + TP_ARGS(ctx), 700 + TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE) 701 + ); 702 + 703 + DEFINE_EVENT_CONDITION(isoc_flush_template, isoc_inbound_multiple_flush, 704 + TP_PROTO(const struct fw_iso_context *ctx), 705 + TP_ARGS(ctx), 706 + TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL) 707 + ); 708 + 673 709 #undef QUADLET_SIZE 674 710 675 711 #endif // _FIREWIRE_TRACE_EVENT_H