Skip to content

Commit

Permalink
prov/efa: Add tracepoint for poll cq ope
Browse files Browse the repository at this point in the history
This tracepoint records the event when a polled cqe
has an associated op entry already, which is expected
for send, RMA, and zero-copy receive operations.

Signed-off-by: Shi Jin <[email protected]>
  • Loading branch information
shijin-aws committed Nov 27, 2024
1 parent 2ad2e37 commit 6c3e82a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions prov/efa/src/rdm/efa_rdm_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,14 @@ void efa_rdm_cq_poll_ibv_cq(ssize_t cqe_to_process, struct efa_ibv_cq *ibv_cq)
pkt_entry = (void *)(uintptr_t)ibv_cq->ibv_cq_ex->wr_id;
qp = efa_domain->qp_table[ibv_wc_read_qp_num(ibv_cq->ibv_cq_ex) & efa_domain->qp_table_sz_m1];
ep = container_of(qp->base_ep, struct efa_rdm_ep, base_ep);
#if HAVE_LTTNG
efa_rdm_tracepoint(poll_cq, (size_t) ibv_cq->ibv_cq_ex->wr_id);
if (pkt_entry && pkt_entry->ope)
efa_rdm_tracepoint(poll_cq_ope, pkt_entry->ope->msg_id,
(size_t) pkt_entry->ope->cq_entry.op_context,
pkt_entry->ope->total_len, pkt_entry->ope->cq_entry.tag,
pkt_entry->ope->addr);
#endif
opcode = ibv_wc_read_opcode(ibv_cq->ibv_cq_ex);
if (ibv_cq->ibv_cq_ex->status) {
prov_errno = efa_rdm_cq_get_prov_errno(ibv_cq->ibv_cq_ex);
Expand Down
5 changes: 5 additions & 0 deletions prov/efa/src/rdm/efa_rdm_tracepoint_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ LTTNG_UST_TRACEPOINT_EVENT_CLASS(EFA_RDM_TP_PROV, x_entry_cq_entry,
LTTNG_UST_TP_ARGS(X_ENTRY_ARGS, CQ_ENTRY_ARGS),
LTTNG_UST_TP_FIELDS(X_ENTRY_FIELDS CQ_ENTRY_FIELDS))

LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(EFA_RDM_TP_PROV, x_entry_cq_entry, EFA_RDM_TP_PROV,
poll_cq_ope,
LTTNG_UST_TP_ARGS(X_ENTRY_ARGS, CQ_ENTRY_ARGS))
LTTNG_UST_TRACEPOINT_LOGLEVEL(EFA_RDM_TP_PROV, poll_cq_ope, LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO)

LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(EFA_RDM_TP_PROV, x_entry_cq_entry, EFA_RDM_TP_PROV,
send_end,
LTTNG_UST_TP_ARGS(X_ENTRY_ARGS, CQ_ENTRY_ARGS))
Expand Down

0 comments on commit 6c3e82a

Please sign in to comment.