diff options
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r-- | net/sunrpc/sched.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index f982dfe53993..d79c63df49b8 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -28,6 +28,9 @@ | |||
28 | #define RPCDBG_FACILITY RPCDBG_SCHED | 28 | #define RPCDBG_FACILITY RPCDBG_SCHED |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #define CREATE_TRACE_POINTS | ||
32 | #include <trace/events/sunrpc.h> | ||
33 | |||
31 | /* | 34 | /* |
32 | * RPC slabs and memory pools | 35 | * RPC slabs and memory pools |
33 | */ | 36 | */ |
@@ -251,6 +254,8 @@ static inline void rpc_task_set_debuginfo(struct rpc_task *task) | |||
251 | 254 | ||
252 | static void rpc_set_active(struct rpc_task *task) | 255 | static void rpc_set_active(struct rpc_task *task) |
253 | { | 256 | { |
257 | trace_rpc_task_begin(task->tk_client, task, NULL); | ||
258 | |||
254 | rpc_task_set_debuginfo(task); | 259 | rpc_task_set_debuginfo(task); |
255 | set_bit(RPC_TASK_ACTIVE, &task->tk_runstate); | 260 | set_bit(RPC_TASK_ACTIVE, &task->tk_runstate); |
256 | } | 261 | } |
@@ -267,6 +272,8 @@ static int rpc_complete_task(struct rpc_task *task) | |||
267 | unsigned long flags; | 272 | unsigned long flags; |
268 | int ret; | 273 | int ret; |
269 | 274 | ||
275 | trace_rpc_task_complete(task->tk_client, task, NULL); | ||
276 | |||
270 | spin_lock_irqsave(&wq->lock, flags); | 277 | spin_lock_irqsave(&wq->lock, flags); |
271 | clear_bit(RPC_TASK_ACTIVE, &task->tk_runstate); | 278 | clear_bit(RPC_TASK_ACTIVE, &task->tk_runstate); |
272 | ret = atomic_dec_and_test(&task->tk_count); | 279 | ret = atomic_dec_and_test(&task->tk_count); |
@@ -324,6 +331,8 @@ static void __rpc_sleep_on_priority(struct rpc_wait_queue *q, | |||
324 | dprintk("RPC: %5u sleep_on(queue \"%s\" time %lu)\n", | 331 | dprintk("RPC: %5u sleep_on(queue \"%s\" time %lu)\n", |
325 | task->tk_pid, rpc_qname(q), jiffies); | 332 | task->tk_pid, rpc_qname(q), jiffies); |
326 | 333 | ||
334 | trace_rpc_task_sleep(task->tk_client, task, q); | ||
335 | |||
327 | __rpc_add_wait_queue(q, task, queue_priority); | 336 | __rpc_add_wait_queue(q, task, queue_priority); |
328 | 337 | ||
329 | BUG_ON(task->tk_callback != NULL); | 338 | BUG_ON(task->tk_callback != NULL); |
@@ -378,6 +387,8 @@ static void __rpc_do_wake_up_task(struct rpc_wait_queue *queue, struct rpc_task | |||
378 | return; | 387 | return; |
379 | } | 388 | } |
380 | 389 | ||
390 | trace_rpc_task_wakeup(task->tk_client, task, queue); | ||
391 | |||
381 | __rpc_remove_wait_queue(queue, task); | 392 | __rpc_remove_wait_queue(queue, task); |
382 | 393 | ||
383 | rpc_make_runnable(task); | 394 | rpc_make_runnable(task); |
@@ -701,6 +712,7 @@ static void __rpc_execute(struct rpc_task *task) | |||
701 | if (do_action == NULL) | 712 | if (do_action == NULL) |
702 | break; | 713 | break; |
703 | } | 714 | } |
715 | trace_rpc_task_run_action(task->tk_client, task, task->tk_action); | ||
704 | do_action(task); | 716 | do_action(task); |
705 | 717 | ||
706 | /* | 718 | /* |