This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH 06/10] Updated nfsd.proc.remove probes
- From: David Smith <dsmith at redhat dot com>
- To: Steve Dickson <SteveD at redhat dot com>
- Cc: Systemtap Mailing list <systemtap at sources dot redhat dot com>
- Date: Fri, 26 Feb 2010 14:43:46 -0600
- Subject: Re: [PATCH 06/10] Updated nfsd.proc.remove probes
- References: <4B86F6E4.8020408@RedHat.com> <4B86F8B1.9080801@RedHat.com>
On 02/25/2010 04:24 PM, Steve Dickson wrote:
> commit fcf7dae52ee72113082eb81c4b72b350b6408e00
> Author: Steve Dickson <steved@redhat.com>
> Date: Tue Feb 23 11:50:38 2010 -0500
>
> Updated nfsd.proc.remove probes
>
> Converted the nfsd.proc.remove probes to used
> the @cast() mechanism.
>
> Created the nfsd.proc4.remove probes
>
> Signed-off-by: Steve Dickson <steved@redhat.com>
>
> diff --git a/tapset/nfsd.stp b/tapset/nfsd.stp
> index 41263fb..9726de0 100644
> --- a/tapset/nfsd.stp
> +++ b/tapset/nfsd.stp
> +probe nfsd.proc4.remove = kernel.function("nfsd4_remove") !,
> + module("nfsd").function("nfsd4_remove") ?
> +{
> + client_ip = addr_from_rqst($rqstp)
> + proto = $rqstp->rq_prot
> + version = 4
> + fh = & @cast($cstate, "nfsd4_compound_state", "kernel:nfsd")->current_fh
> + filelen = $remove->rm_namelen
> + filename = kernel_string_n($remove->rm_name, filelen)
> +
> + name = "nfsd.proc4.remove"
> + argstr = sprintf("%s", filename);
> +
> +}
Hmm. I know from looking you were just following what is in
nfsd.proc3.remove, but because of the way the optimizer works, it might
be better to change this body a bit to avoid using the convenience
variables in later statements. That way they can be optimized out easier.
Something more like this:
{
client_ip = addr_from_rqst($rqstp)
proto = $rqstp->rq_prot
version = 4
fh = & @cast($cstate, "nfsd4_compound_state", "kernel:nfsd")->current_fh
filelen = $remove->rm_namelen
filename = kernel_string_n($remove->rm_name, $remove->rm_namelen)
name = "nfsd.proc4.remove"
argstr = sprintf("%s", kernel_string_n($remove->rm_name,
$remove->rm_namelen));
}
I'm not sure how big of a deal this is though.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)