Skip to content

Commit

Permalink
Merge pull request openucx#6392 from petro-rudenko/uct/log-reg-mr
Browse files Browse the repository at this point in the history
UCT: trace ibv_reg_mr time.
  • Loading branch information
yosefe authored Feb 24, 2021
2 parents ecaaf60 + 7654866 commit bc2eccf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/uct/ib/base/ib_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ ucs_status_t uct_ib_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
uint64_t access_flags, struct ibv_mr **mr_p,
int silent)
{
ucs_time_t start_time = ucs_get_time();
struct ibv_mr *mr;
#if HAVE_DECL_IBV_EXP_REG_MR
struct ibv_exp_reg_mr_in in = {};
Expand All @@ -538,6 +539,11 @@ ucs_status_t uct_ib_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
}

*mr_p = mr;

/* to prvent clang dead code */
(void)start_time;
ucs_trace("ibv_reg_mr(%p, %p, %zu) took %.3f msec", pd, addr, length,
ucs_time_to_msec(ucs_get_time() - start_time));
return UCS_OK;
}

Expand Down

0 comments on commit bc2eccf

Please sign in to comment.