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: changelog files, %( %) idioms


On Thu, Mar 06, 2008 at 09:48:30AM -0500, William Cohen wrote:
> Ananth N Mavinakayanahalli wrote:
>> On Mon, Mar 03, 2008 at 11:48:13AM -0500, William Cohen wrote:
>>> Frank Ch. Eigler wrote:
>>>> Hi -
>>>>
>>>> On Mon, Mar 03, 2008 at 05:48:41PM +0530, Ananth N Mavinakayanahalli wrote:
>>>>> [...]
>>>>>  probe syscall.sigaltstack = kernel.function("sys_sigaltstack") {
>>>>>  	name = "sigaltstack"
>>>>> -	ebx = $ebx
>>>>> -	argstr = sprintf("%p", $ebx)
>>>>> +	bx = %( kernel_vr > "2.6.24" %? $bx %: $ebx %)
>>>>> +	argstr = sprintf("%p", %( kernel_vr > "2.6.24" %? $bx %: $ebx %) )
>>>> I suggest picking a single more informative variable name than "ebx"
>>>> or "bx" for that parameter.  Then that variable could be used as the
>>>> plain sprintf value.
>>>>
>>>> - FChE
>>> I saw this this cause failure on F-9 i686. There could be 2.6.24.1, so 
>>> probably want to check that the kernel is earlier than 2.6.25. Something 
>>> like the following:
>>
>> Actually, this went into 2.6.25-rc
>>
>>> bx = %( kernel_vr < "2.6.25" %? $bx %: $ebx %)
>>>
>>> Could the use of $bx be factored out of argstr, so there is only one 
>>> check for the kernel version for $ebx/$bx rather than two?
>>
>> How does this look?
>>
>> ---
>>  tapset/i686/syscalls.stp |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> Index: systemtap-4mar/tapset/i686/syscalls.stp
>> ===================================================================
>> --- systemtap-4mar.orig/tapset/i686/syscalls.stp
>> +++ systemtap-4mar/tapset/i686/syscalls.stp
>> @@ -119,8 +119,8 @@ probe syscall.set_zone_reclaim.return =
>>  #
>>  probe syscall.sigaltstack = kernel.function("sys_sigaltstack") {
>>  	name = "sigaltstack"
>> -	ebx = $ebx
>> -	argstr = sprintf("%p", $ebx)
>> +	ussp = %( kernel_vr < "2.6.25" %? $ebx %: $bx %)
>> +	argstr = sprintf("%p", ussp)
>>  }
>>  probe syscall.sigaltstack.return = kernel.function("sys_sigaltstack").return {
>>  	name = "sigaltstack"
>
> That looks okay.

Patch committed.

Thanks,
Ananth


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