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


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:


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?

-Will


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