mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
nbd: add tracepoints for send/receive timing
This adds four tracepoints to nbd, enabling separate tracing of payload and header sending/receipt. In the send path for headers that have already been sent, we also explicitly initialize the handle so it can be referenced by the later tracepoint. Signed-off-by: Andrew Hall <hall@fb.com> Signed-off-by: Matt Mullins <mmullins@fb.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
ea106722c7
commit
2abd2de712
2 changed files with 59 additions and 0 deletions
|
@ -7,6 +7,57 @@
|
|||
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
DECLARE_EVENT_CLASS(nbd_transport_event,
|
||||
|
||||
TP_PROTO(struct request *req, u64 handle),
|
||||
|
||||
TP_ARGS(req, handle),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(struct request *, req)
|
||||
__field(u64, handle)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->req = req;
|
||||
__entry->handle = handle;
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
"nbd transport event: request %p, handle 0x%016llx",
|
||||
__entry->req,
|
||||
__entry->handle
|
||||
)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(nbd_transport_event, nbd_header_sent,
|
||||
|
||||
TP_PROTO(struct request *req, u64 handle),
|
||||
|
||||
TP_ARGS(req, handle)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(nbd_transport_event, nbd_payload_sent,
|
||||
|
||||
TP_PROTO(struct request *req, u64 handle),
|
||||
|
||||
TP_ARGS(req, handle)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(nbd_transport_event, nbd_header_received,
|
||||
|
||||
TP_PROTO(struct request *req, u64 handle),
|
||||
|
||||
TP_ARGS(req, handle)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(nbd_transport_event, nbd_payload_received,
|
||||
|
||||
TP_PROTO(struct request *req, u64 handle),
|
||||
|
||||
TP_ARGS(req, handle)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(nbd_send_request,
|
||||
|
||||
TP_PROTO(struct nbd_request *nbd_request, int index,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue