All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/1] SUNRPC: Adding status trace points
Date: Mon, 23 Jan 2012 15:49:42 -0500	[thread overview]
Message-ID: <4F1DC7E6.4010200@RedHat.com> (raw)
In-Reply-To: <383508F5-8A0B-4EBE-B81B-6A75887CD156@oracle.com>



On 01/23/2012 03:02 PM, Chuck Lever wrote:
> 
> On Jan 23, 2012, at 2:54 PM, Steve Dickson wrote:
> 
>> This patch adds three trace points to the status routines
>> in the sunrpc state machine.
>>
>> Signed-off-by: Steve Dickson <steved@redhat.com>
>> ---
>> 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)
>> +);
>> +
>> +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(int status),
>> +
>> +	TP_ARGS(status),
>> +
>> +	TP_STRUCT__entry(
>> +		__field(int, status)
>> +	),
>> +
>> +	TP_fast_assign(
>> +		__entry->status = status;
>> +	),
>> +
>> +	TP_printk("status=%d", __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/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
>> index f0268ea..bbe7385 100644
>> --- a/net/sunrpc/clnt.c
>> +++ b/net/sunrpc/clnt.c
>> @@ -55,6 +55,7 @@ static DEFINE_SPINLOCK(rpc_client_lock);
>>
>> static DECLARE_WAIT_QUEUE_HEAD(destroy_wait);
>>
>> +#include <trace/events/sunrpc.h>
> 
> I'd prefer that this #include be kept with the others at the head of the file, unless there is a strong reason this one needs to be inconsistent.
No particular reason it there... Things still compile when its moved up.
Trond, if you are inclined to accept these I'll do the repost.
 
> 
> I'm glad a clean way was found to add trace points to the RPC client.
Ditto... I wounder if it time we talking about maintaining some 
basic probs that we can point people to help them debug. Also
maybe come up with some type of strategy of how we want to
use this in the future... Should be start moving toward 
having trace point replace dprintks? 

steved. 

  reply	other threads:[~2012-01-23 20:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 19:54 [PATCH 0/1] SUNRPC: Status trace points Steve Dickson
2012-01-23 19:54 ` [PATCH 1/1] SUNRPC: Adding status " Steve Dickson
2012-01-23 20:02   ` Chuck Lever
2012-01-23 20:49     ` Steve Dickson [this message]
2012-01-23 21:36   ` Trond Myklebust
2012-01-24 13:34     ` Steve Dickson
2012-01-24 17:12       ` Myklebust, Trond

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F1DC7E6.4010200@RedHat.com \
    --to=steved@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.