Skip to content

Commit 9f16ac7

Browse files
committed
firewire: core: add tracepoints events for setting channels of multichannel context
It is helpful to trace the channel setting for the multichannel isochronous context when the core function is requested it 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 25e6e00 commit 9f16ac7

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

drivers/firewire/core-iso.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ EXPORT_SYMBOL(fw_iso_context_start);
177177

178178
int fw_iso_context_set_channels(struct fw_iso_context *ctx, u64 *channels)
179179
{
180+
trace_isoc_inbound_multiple_channels(ctx, *channels);
181+
180182
return ctx->card->driver->set_iso_channels(ctx, channels);
181183
}
182184

include/trace/events/firewire.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,27 @@ DEFINE_EVENT_CONDITION(isoc_destroy_template, isoc_inbound_multiple_destroy,
541541
TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL)
542542
);
543543

544+
TRACE_EVENT(isoc_inbound_multiple_channels,
545+
TP_PROTO(const struct fw_iso_context *ctx, u64 channels),
546+
TP_ARGS(ctx, channels),
547+
TP_STRUCT__entry(
548+
__field(u64, context)
549+
__field(u8, card_index)
550+
__field(u64, channels)
551+
),
552+
TP_fast_assign(
553+
__entry->context = (uintptr_t)ctx;
554+
__entry->card_index = ctx->card->index;
555+
__entry->channels = channels;
556+
),
557+
TP_printk(
558+
"context=0x%llx card_index=%u channels=0x%016llx",
559+
__entry->context,
560+
__entry->card_index,
561+
__entry->channels
562+
)
563+
);
564+
544565
#undef QUADLET_SIZE
545566

546567
#endif // _FIREWIRE_TRACE_EVENT_H

0 commit comments

Comments
 (0)