summaryrefslogtreecommitdiff
path: root/net/rxrpc/recvmsg.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-07 14:34:21 +0100
committerDavid Howells <dhowells@redhat.com>2016-09-07 15:30:22 +0100
commitfff72429c2e83bdbe32dc7f1ad6398dfe50750c6 (patch)
tree3b905c48f05baada1309ebcba5d3ba0dbee9e83f /net/rxrpc/recvmsg.c
parente796cb419237f54b96442ae7feca1859c693865c (diff)
rxrpc: Improve the call tracking tracepoint
Improve the call tracking tracepoint by showing more differentiation between some of the put and get events, including: (1) Getting and putting refs for the socket call user ID tree. (2) Getting and putting refs for queueing and failing to queue the call processor work item. Note that these aren't necessarily used in this patch, but will be taken advantage of in future patches. An enum is added for the event subtype numbers rather than coding them directly as decimal numbers and a table of 3-letter strings is provided rather than a sequence of ?: operators. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/recvmsg.c')
-rw-r--r--net/rxrpc/recvmsg.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c
index 0ab7b334bab1..97f8ee76c67c 100644
--- a/net/rxrpc/recvmsg.c
+++ b/net/rxrpc/recvmsg.c
@@ -79,7 +79,8 @@ int rxrpc_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
if (rx->sk.sk_state != RXRPC_SERVER_LISTENING) {
release_sock(&rx->sk);
if (continue_call)
- rxrpc_put_call(continue_call);
+ rxrpc_put_call(continue_call,
+ rxrpc_call_put);
return -ENODATA;
}
}
@@ -137,13 +138,13 @@ int rxrpc_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
if (call != continue_call ||
skb->mark != RXRPC_SKB_MARK_DATA) {
release_sock(&rx->sk);
- rxrpc_put_call(continue_call);
+ rxrpc_put_call(continue_call, rxrpc_call_put);
_leave(" = %d [noncont]", copied);
return copied;
}
}
- rxrpc_get_call(call);
+ rxrpc_get_call(call, rxrpc_call_got);
/* copy the peer address and timestamp */
if (!continue_call) {
@@ -233,7 +234,7 @@ int rxrpc_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
if (!continue_call)
continue_call = sp->call;
else
- rxrpc_put_call(call);
+ rxrpc_put_call(call, rxrpc_call_put);
call = NULL;
if (flags & MSG_PEEK) {
@@ -255,9 +256,9 @@ int rxrpc_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
out:
release_sock(&rx->sk);
if (call)
- rxrpc_put_call(call);
+ rxrpc_put_call(call, rxrpc_call_put);
if (continue_call)
- rxrpc_put_call(continue_call);
+ rxrpc_put_call(continue_call, rxrpc_call_put);
_leave(" = %d [data]", copied);
return copied;
@@ -341,18 +342,18 @@ terminal_message:
}
release_sock(&rx->sk);
- rxrpc_put_call(call);
+ rxrpc_put_call(call, rxrpc_call_put);
if (continue_call)
- rxrpc_put_call(continue_call);
+ rxrpc_put_call(continue_call, rxrpc_call_put);
_leave(" = %d", ret);
return ret;
copy_error:
_debug("copy error");
release_sock(&rx->sk);
- rxrpc_put_call(call);
+ rxrpc_put_call(call, rxrpc_call_put);
if (continue_call)
- rxrpc_put_call(continue_call);
+ rxrpc_put_call(continue_call, rxrpc_call_put);
_leave(" = %d", ret);
return ret;
@@ -361,7 +362,7 @@ wait_interrupted:
wait_error:
finish_wait(sk_sleep(&rx->sk), &wait);
if (continue_call)
- rxrpc_put_call(continue_call);
+ rxrpc_put_call(continue_call, rxrpc_call_put);
if (copied)
copied = ret;
_leave(" = %d [waitfail %d]", copied, ret);