Skip to content

Commit

Permalink
svcrdma: Rename svcrdma_encode trace points in send routines
Browse files Browse the repository at this point in the history
These trace points are misnamed:

	trace_svcrdma_encode_wseg
	trace_svcrdma_encode_write
	trace_svcrdma_encode_reply
	trace_svcrdma_encode_rseg
	trace_svcrdma_encode_read
	trace_svcrdma_encode_pzr

Because they actually trace posting on the Send Queue. Let's rename
them so that I can add trace points in the chunk list encoders that
actually do trace chunk list encoding events.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
Chuck Lever committed Mar 16, 2020
1 parent db9602e commit a406c56
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
14 changes: 9 additions & 5 deletions include/trace/events/rpcrdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,9 @@ DECLARE_EVENT_CLASS(svcrdma_segment_event,

DEFINE_SEGMENT_EVENT(decode_wseg);
DEFINE_SEGMENT_EVENT(encode_rseg);
DEFINE_SEGMENT_EVENT(send_rseg);
DEFINE_SEGMENT_EVENT(encode_wseg);
DEFINE_SEGMENT_EVENT(send_wseg);

DECLARE_EVENT_CLASS(svcrdma_chunk_event,
TP_PROTO(
Expand All @@ -1502,17 +1504,19 @@ DECLARE_EVENT_CLASS(svcrdma_chunk_event,
);

#define DEFINE_CHUNK_EVENT(name) \
DEFINE_EVENT(svcrdma_chunk_event, svcrdma_encode_##name,\
DEFINE_EVENT(svcrdma_chunk_event, svcrdma_##name, \
TP_PROTO( \
u32 length \
), \
TP_ARGS(length))

DEFINE_CHUNK_EVENT(pzr);
DEFINE_CHUNK_EVENT(write);
DEFINE_CHUNK_EVENT(reply);
DEFINE_CHUNK_EVENT(send_pzr);
DEFINE_CHUNK_EVENT(encode_write_chunk);
DEFINE_CHUNK_EVENT(send_write_chunk);
DEFINE_CHUNK_EVENT(encode_read_chunk);
DEFINE_CHUNK_EVENT(send_reply_chunk);

TRACE_EVENT(svcrdma_encode_read,
TRACE_EVENT(svcrdma_send_read_chunk,
TP_PROTO(
u32 length,
u32 position
Expand Down
13 changes: 7 additions & 6 deletions net/sunrpc/xprtrdma/svc_rdma_rw.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ svc_rdma_build_writes(struct svc_rdma_write_info *info,
if (ret < 0)
goto out_initerr;

trace_svcrdma_encode_wseg(seg_handle, write_len, seg_offset);
trace_svcrdma_send_wseg(seg_handle, write_len, seg_offset);

list_add(&ctxt->rw_list, &cc->cc_rwctxts);
cc->cc_sqecount += ret;
if (write_len == seg_length - info->wi_seg_off) {
Expand Down Expand Up @@ -534,7 +535,7 @@ int svc_rdma_send_write_chunk(struct svcxprt_rdma *rdma, __be32 *wr_ch,
if (ret < 0)
goto out_err;

trace_svcrdma_encode_write(xdr->page_len);
trace_svcrdma_send_write_chunk(xdr->page_len);
return length;

out_err:
Expand Down Expand Up @@ -594,7 +595,7 @@ int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma,
if (ret < 0)
goto out_err;

trace_svcrdma_encode_reply(consumed);
trace_svcrdma_send_reply_chunk(consumed);
return consumed;

out_err:
Expand Down Expand Up @@ -697,7 +698,7 @@ static int svc_rdma_build_read_chunk(struct svc_rqst *rqstp,
if (ret < 0)
break;

trace_svcrdma_encode_rseg(rs_handle, rs_length, rs_offset);
trace_svcrdma_send_rseg(rs_handle, rs_length, rs_offset);
info->ri_chunklen += rs_length;
}

Expand Down Expand Up @@ -728,7 +729,7 @@ static int svc_rdma_build_normal_read_chunk(struct svc_rqst *rqstp,
if (ret < 0)
goto out;

trace_svcrdma_encode_read(info->ri_chunklen, info->ri_position);
trace_svcrdma_send_read_chunk(info->ri_chunklen, info->ri_position);

head->rc_hdr_count = 0;

Expand Down Expand Up @@ -784,7 +785,7 @@ static int svc_rdma_build_pz_read_chunk(struct svc_rqst *rqstp,
if (ret < 0)
goto out;

trace_svcrdma_encode_pzr(info->ri_chunklen);
trace_svcrdma_send_pzr(info->ri_chunklen);

head->rc_arg.len += info->ri_chunklen;
head->rc_arg.buflen += info->ri_chunklen;
Expand Down

0 comments on commit a406c56

Please sign in to comment.