From eccb4dfd4b3810f7ca242c441f4c83d7b0a5068c Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 6 Feb 2012 10:08:08 -0500 Subject: [PATCH] --- yaml --- r: 294443 b: refs/heads/master c: 5753cba17611af108995672c4e2d978014e17a56 h: refs/heads/master i: 294441: e1ed99fcfb23e68df327b508557640fc20094f23 294439: 04b29ab71a02a2c2232d503c822464d11c53ea96 v: v3 --- [refs] | 2 +- trunk/include/trace/events/sunrpc.h | 53 +++++++++++++++++++++++++++++ trunk/net/sunrpc/clnt.c | 4 +++ 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index bba69ee0b1ae..b4cfef4179f4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 85c0d24f026ca6935897694be4eb0b5c514b907d +refs/heads/master: 5753cba17611af108995672c4e2d978014e17a56 diff --git a/trunk/include/trace/events/sunrpc.h b/trunk/include/trace/events/sunrpc.h index ec8668d978d9..43be87d5dd58 100644 --- a/trunk/include/trace/events/sunrpc.h +++ b/trunk/include/trace/events/sunrpc.h @@ -8,6 +8,59 @@ #include #include +DECLARE_EVENT_CLASS(rpc_task_status, + + TP_PROTO(struct rpc_task *task), + + TP_ARGS(task), + + TP_STRUCT__entry( + __field(const struct rpc_task *, task) + __field(const struct rpc_clnt *, clnt) + __field(int, status) + ), + + TP_fast_assign( + __entry->task = task; + __entry->clnt = task->tk_client; + __entry->status = task->tk_status; + ), + + TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) +); + +DEFINE_EVENT(rpc_task_status, rpc_call_status, + TP_PROTO(struct rpc_task *task), + + TP_ARGS(task) +); + +DEFINE_EVENT(rpc_task_status, rpc_bind_status, + TP_PROTO(struct rpc_task *task), + + TP_ARGS(task) +); + +TRACE_EVENT(rpc_connect_status, + TP_PROTO(struct rpc_task *task, int status), + + TP_ARGS(task, status), + + TP_STRUCT__entry( + __field(const struct rpc_task *, task) + __field(const struct rpc_clnt *, clnt) + __field(int, status) + ), + + TP_fast_assign( + __entry->task = task; + __entry->clnt = task->tk_client; + __entry->status = status; + ), + + TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) +); + DECLARE_EVENT_CLASS(rpc_task_running, TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), diff --git a/trunk/net/sunrpc/clnt.c b/trunk/net/sunrpc/clnt.c index db7220d87732..bb7ed2f3aee6 100644 --- a/trunk/net/sunrpc/clnt.c +++ b/trunk/net/sunrpc/clnt.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "sunrpc.h" #include "netns.h" @@ -1247,6 +1248,7 @@ call_bind_status(struct rpc_task *task) return; } + trace_rpc_bind_status(task); switch (task->tk_status) { case -ENOMEM: dprintk("RPC: %5u rpcbind out of memory\n", task->tk_pid); @@ -1346,6 +1348,7 @@ call_connect_status(struct rpc_task *task) return; } + trace_rpc_connect_status(task, status); switch (status) { /* if soft mounted, test if we've timed out */ case -ETIMEDOUT: @@ -1534,6 +1537,7 @@ call_status(struct rpc_task *task) return; } + trace_rpc_call_status(task); task->tk_status = 0; switch(status) { case -EHOSTDOWN: