History

afs: trace: Log afs_make_call(), including server address

Add a tracepoint to log calls to afs_make_call(), including the destination server address.

David Howells committed 2 years ago

Commit abcbd3b1 parent 28f4c585 files · +81 −0Browse files

Showing the changes to include/trace (1 of 5 files). Show all

Unified · Split

include/trace/events/afs.h+36−0
@@ -1576,6 +1576,42 @@ TRACE_EVENT(afs_rotate, · 1575 unmodified lines
15761576 __entry->extra)
15771577 );
15781578
1579+TRACE_EVENT(afs_make_call,
1580+ TP_PROTO(struct afs_call *call),
1581+
1582+ TP_ARGS(call),
1583+
1584+ TP_STRUCT__entry(
1585+ __field(unsigned int, call)
1586+ __field(bool, is_vl)
1587+ __field(enum afs_fs_operation, op)
1588+ __field_struct(struct afs_fid, fid)
1589+ __field_struct(struct sockaddr_rxrpc, srx)
1590+ ),
1591+
1592+ TP_fast_assign(
1593+ __entry->call = call->debug_id;
1594+ __entry->op = call->operation_ID;
1595+ __entry->fid = call->fid;
1596+ memcpy(&__entry->srx, rxrpc_kernel_remote_srx(call->peer),
1597+ sizeof(__entry->srx));
1598+ __entry->srx.srx_service = call->service_id;
1599+ __entry->is_vl = (__entry->srx.srx_service == VL_SERVICE ||
1600+ __entry->srx.srx_service == YFS_VL_SERVICE);
1601+ ),
1602+
1603+ TP_printk("c=%08x %pISpc+%u %s %llx:%llx:%x",
1604+ __entry->call,
1605+ &__entry->srx.transport,
1606+ __entry->srx.srx_service,
1607+ __entry->is_vl ?
1608+ __print_symbolic(__entry->op, afs_vl_operations) :
1609+ __print_symbolic(__entry->op, afs_fs_operations),
1610+ __entry->fid.vid,
1611+ __entry->fid.vnode,
1612+ __entry->fid.unique)
1613+ );
1614+
15791615 #endif /* _TRACE_AFS_H */
15801616
15811617 /* This part must be outside protection */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t