mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
afs: Add a tracepoint for afs_read_receive()
Add a tracepoint for afs_read_receive() to allow potential missed wakeups to be debugged. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241108173236.1382366-33-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
761dc4f0b8
commit
202d36ca3f
@ -274,6 +274,7 @@ static void afs_read_receive(struct afs_call *call)
|
||||
state = READ_ONCE(call->state);
|
||||
if (state == AFS_CALL_COMPLETE)
|
||||
return;
|
||||
trace_afs_read_recv(op, call);
|
||||
|
||||
while (state < AFS_CALL_COMPLETE && READ_ONCE(call->need_attention)) {
|
||||
WRITE_ONCE(call->need_attention, false);
|
||||
|
@ -1775,6 +1775,36 @@ TRACE_EVENT(afs_make_call,
|
||||
__entry->fid.unique)
|
||||
);
|
||||
|
||||
TRACE_EVENT(afs_read_recv,
|
||||
TP_PROTO(const struct afs_operation *op, const struct afs_call *call),
|
||||
|
||||
TP_ARGS(op, call),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned int, rreq)
|
||||
__field(unsigned int, sreq)
|
||||
__field(unsigned int, op)
|
||||
__field(unsigned int, op_flags)
|
||||
__field(unsigned int, call)
|
||||
__field(enum afs_call_state, call_state)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->op = op->debug_id;
|
||||
__entry->sreq = op->fetch.subreq->debug_index;
|
||||
__entry->rreq = op->fetch.subreq->rreq->debug_id;
|
||||
__entry->op_flags = op->flags;
|
||||
__entry->call = call->debug_id;
|
||||
__entry->call_state = call->state;
|
||||
),
|
||||
|
||||
TP_printk("R=%08x[%x] OP=%08x c=%08x cs=%x of=%x",
|
||||
__entry->rreq, __entry->sreq,
|
||||
__entry->op,
|
||||
__entry->call, __entry->call_state,
|
||||
__entry->op_flags)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_AFS_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
Loading…
Reference in New Issue
Block a user