From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21974 invoked by alias); 26 Feb 2010 20:43:55 -0000 Received: (qmail 21958 invoked by uid 22791); 26 Feb 2010 20:43:54 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Feb 2010 20:43:49 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1QKhlYO028757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 26 Feb 2010 15:43:48 -0500 Received: from localhost.localdomain (vpn-8-184.rdu.redhat.com [10.11.8.184]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1QKhkLs027682 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Feb 2010 15:43:47 -0500 Message-ID: <4B883282.8050004@redhat.com> Date: Fri, 26 Feb 2010 20:43:00 -0000 From: David Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.1 MIME-Version: 1.0 To: Steve Dickson CC: Systemtap Mailing list Subject: Re: [PATCH 06/10] Updated nfsd.proc.remove probes References: <4B86F6E4.8020408@RedHat.com> <4B86F8B1.9080801@RedHat.com> In-Reply-To: <4B86F8B1.9080801@RedHat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2010-q1/txt/msg00544.txt.bz2 On 02/25/2010 04:24 PM, Steve Dickson wrote: > commit fcf7dae52ee72113082eb81c4b72b350b6408e00 > Author: Steve Dickson > 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 > > 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)