This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 02/10] Updated nfsd.proc.lookup probes



On 02/26/2010 03:25 PM, David Smith wrote:
> On 02/25/2010 04:19 PM, Steve Dickson wrote:
>> commit 472a70b44b5858c60373aa45a119ad66b804061b
>> Author: Steve Dickson <steved@redhat.com>
>> Date:   Tue Feb 23 11:29:06 2010 -0500
>>
>>     Updated nfsd.proc.lookup probes
>>     
>>     Converted the nfsd.proc.lookup probes to used
>>     the @cast() mechanism.
>>     
>>     Created the nfsd.proc4.lookup probes
>>     
>>     Signed-off-by: Steve Dickson <steved@redhat.com>
>>
>> diff --git a/tapset/nfsd.stp b/tapset/nfsd.stp
>> index df8efa8..92f682f 100644
>> --- a/tapset/nfsd.stp
>> +++ b/tapset/nfsd.stp
>> @@ -11,10 +11,6 @@
> 
> ... great use of '@cast' to remove lots of embedded C...
> 
>>  probe nfsd.proc2.lookup = kernel.function("nfsd_proc_lookup") !,
>> @@ -207,7 +136,7 @@ probe nfsd.proc2.lookup = kernel.function("nfsd_proc_lookup") !,
>>  	client_ip = addr_from_rqst($rqstp)
>>  	proto = $rqstp->rq_prot
>>          version = 2
>> -	fh = __get_fh($argp,1)
>> +	fh = & @cast($argp, "nfsd_diropargs", "kernel:nfsd")->fh
>>  
>>  	filelen = $argp->len
>>  	filename = kernel_string_n($argp->name, filelen)
>> @@ -222,7 +151,7 @@ probe nfsd.proc2.lookup.return = kernel.function("nfsd_proc_lookup").return !,
>>  {
>>  	name = "nfsd.proc2.lookup.return"
>>  	version = 2
>> -	retstr = sprintf("%d",$return)
>> +	retstr = sprintf("%s", nfsderror($return))
>>  }
> 
> This last change points out an issue we're starting to worry about -
> backwards compatibility.  If a script that previously used this probe
> depended on getting a string in the old format, you just broke their script.
> 
> This one is probably OK, but it is something to think about.
Well the way looked at it was if people wanted a particular
format they probably used the $return variable and not the retstr..

steved.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]