mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
rpcrdma: Trace connection registration and unregistration
These new trace points record xarray indices and the time of endpoint registration and unregistration, to co-ordinate with device removal events. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
6b3b023e2d
commit
dc0112e6d8
@ -2277,6 +2277,42 @@ DEFINE_CLIENT_DEVICE_EVENT(rpcrdma_client_remove_one);
|
||||
DEFINE_CLIENT_DEVICE_EVENT(rpcrdma_client_wait_on);
|
||||
DEFINE_CLIENT_DEVICE_EVENT(rpcrdma_client_remove_one_done);
|
||||
|
||||
DECLARE_EVENT_CLASS(rpcrdma_client_register_class,
|
||||
TP_PROTO(
|
||||
const struct ib_device *device,
|
||||
const struct rpcrdma_notification *rn
|
||||
),
|
||||
|
||||
TP_ARGS(device, rn),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(name, device->name)
|
||||
__field(void *, callback)
|
||||
__field(u32, index)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(name);
|
||||
__entry->callback = rn->rn_done;
|
||||
__entry->index = rn->rn_index;
|
||||
),
|
||||
|
||||
TP_printk("device=%s index=%u done callback=%pS\n",
|
||||
__get_str(name), __entry->index, __entry->callback
|
||||
)
|
||||
);
|
||||
|
||||
#define DEFINE_CLIENT_REGISTER_EVENT(name) \
|
||||
DEFINE_EVENT(rpcrdma_client_register_class, name, \
|
||||
TP_PROTO( \
|
||||
const struct ib_device *device, \
|
||||
const struct rpcrdma_notification *rn \
|
||||
), \
|
||||
TP_ARGS(device, rn))
|
||||
|
||||
DEFINE_CLIENT_REGISTER_EVENT(rpcrdma_client_register);
|
||||
DEFINE_CLIENT_REGISTER_EVENT(rpcrdma_client_unregister);
|
||||
|
||||
#endif /* _TRACE_RPCRDMA_H */
|
||||
|
||||
#include <trace/define_trace.h>
|
||||
|
@ -66,6 +66,7 @@ int rpcrdma_rn_register(struct ib_device *device,
|
||||
return -ENOMEM;
|
||||
kref_get(&rd->rd_kref);
|
||||
rn->rn_done = done;
|
||||
trace_rpcrdma_client_register(device, rn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -91,6 +92,7 @@ void rpcrdma_rn_unregister(struct ib_device *device,
|
||||
if (!rd)
|
||||
return;
|
||||
|
||||
trace_rpcrdma_client_unregister(device, rn);
|
||||
xa_erase(&rd->rd_xa, rn->rn_index);
|
||||
kref_put(&rd->rd_kref, rpcrdma_rn_release);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user