Skip to content

Commit c0b0ce6

Browse files
committed
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/[email protected] Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent 4e64210 commit c0b0ce6

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

drivers/firewire/core-iso.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ EXPORT_SYMBOL(fw_iso_context_queue);
197197

198198
void fw_iso_context_queue_flush(struct fw_iso_context *ctx)
199199
{
200+
trace_isoc_outbound_flush(ctx);
201+
trace_isoc_inbound_single_flush(ctx);
202+
trace_isoc_inbound_multiple_flush(ctx);
203+
200204
ctx->card->driver->flush_queue_iso(ctx);
201205
}
202206
EXPORT_SYMBOL(fw_iso_context_queue_flush);

include/trace/events/firewire.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,42 @@ DEFINE_EVENT_CONDITION(isoc_stop_template, isoc_inbound_multiple_stop,
670670
TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL)
671671
);
672672

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+
673709
#undef QUADLET_SIZE
674710

675711
#endif // _FIREWIRE_TRACE_EVENT_H

0 commit comments

Comments
 (0)