From 074e98f22eeef5d00ab11c5cd1f02587feaadf1b Mon Sep 17 00:00:00 2001 From: Shi Jin Date: Mon, 25 Nov 2024 21:54:56 +0000 Subject: [PATCH] prov/efa: Add tracepoint for poll cq ope 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 --- prov/efa/src/rdm/efa_rdm_cq.c | 7 +++++++ prov/efa/src/rdm/efa_rdm_tracepoint_def.h | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/prov/efa/src/rdm/efa_rdm_cq.c b/prov/efa/src/rdm/efa_rdm_cq.c index 4b3bcd74d1d..294bef21dec 100644 --- a/prov/efa/src/rdm/efa_rdm_cq.c +++ b/prov/efa/src/rdm/efa_rdm_cq.c @@ -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); diff --git a/prov/efa/src/rdm/efa_rdm_tracepoint_def.h b/prov/efa/src/rdm/efa_rdm_tracepoint_def.h index 6e2fab54b7f..b814e957372 100644 --- a/prov/efa/src/rdm/efa_rdm_tracepoint_def.h +++ b/prov/efa/src/rdm/efa_rdm_tracepoint_def.h @@ -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))