Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294443
b: refs/heads/master
c: 5753cba
h: refs/heads/master
i:
  294441: e1ed99f
  294439: 04b29ab
v: v3
  • Loading branch information
Steve Dickson authored and Trond Myklebust committed Feb 6, 2012
1 parent 0f4ce96 commit eccb4df
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85c0d24f026ca6935897694be4eb0b5c514b907d
refs/heads/master: 5753cba17611af108995672c4e2d978014e17a56
53 changes: 53 additions & 0 deletions trunk/include/trace/events/sunrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,59 @@
#include <linux/sunrpc/clnt.h>
#include <linux/tracepoint.h>

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),
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <linux/sunrpc/rpc_pipe_fs.h>
#include <linux/sunrpc/metrics.h>
#include <linux/sunrpc/bc_xprt.h>
#include <trace/events/sunrpc.h>

#include "sunrpc.h"
#include "netns.h"
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -1534,6 +1537,7 @@ call_status(struct rpc_task *task)
return;
}

trace_rpc_call_status(task);
task->tk_status = 0;
switch(status) {
case -EHOSTDOWN:
Expand Down

0 comments on commit eccb4df

Please sign in to comment.