Re: [PATCH 1/1] SUNRPC: Adding status trace points

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-01-23 at 14:54 -0500, Steve Dickson wrote: 
> This patch adds three trace points to the status routines
> in the sunrpc state machine.
> 
> Signed-off-by: Steve Dickson <steved@xxxxxxxxxx>
> ---
>  include/trace/events/sunrpc.h |   45 +++++++++++++++++++++++++++++++++++++++++
>  net/sunrpc/clnt.c             |    4 +++
>  2 files changed, 49 insertions(+), 0 deletions(-)
> 
> diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
> index 1852f11..bca5ad3 100644
> --- a/include/trace/events/sunrpc.h
> +++ b/include/trace/events/sunrpc.h
> @@ -8,6 +8,51 @@
>  #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(int, status)
> +	),
> +
> +	TP_fast_assign(
> +		__entry->status = task->tk_status;
> +	),
> +
> +	TP_printk("status %d", __entry->status)
> +);

How do you tell which RPC task this refers to in the output? Shouldn't
we rather make the above

	TP_printk("task:%p@%p, status %d", __entry->task, __entry->clnt, __entry->status)

so that it matches the format in the previous tracepoint patch?

Also, why are you adding tracepoints for specific states in
net/sunrpc/clnt.c? Is the intention to allow the user to target specific
bugs that might be harder to spot in the output from
trace_rpc_task_run_action()?

Cheers
  Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux