This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: problems displaying offsets...
On 05/20/2010 03:12 PM, David Smith wrote:
> On 05/18/2010 08:20 AM, Steve Dickson wrote:
>> In need of a second pair of eyes...
>>
>> probe kernel.function("kernel_sendpage")
>> {
>> size = ulong_arg(4)
>> printf("kernel_sendpage: offset %d size %d\n", $offset, size);
>> }
>>
>> From some reason the offset displayed is always zero in the
>> above probe and I know for fact its not always zero...
>>
>> I'm have the same problem in I/O probes in the nfsd.proc.commit
>> probe... Does anybody see what I'm doing wrong?
>
> Hmm. I don't really see anything too odd here. Why are you using 'size
> = ulong_arg(4)' instead of just $size?
>
Yes, it seems like $size would be the easier way to go. Looking
through the code size_t could be "unsigned long" (x86_64) or "unsigned
int" (i386):
http://rhkernel.org/RHEL6+2.6.32-19.el6/arch/x86/include/asm/posix_types_32.h#L18
http://rhkernel.org/RHEL6+2.6.32-19.el6/arch/x86/include/asm/posix_types_64.h#L18
Portability might be a problem using ulong_arg() in this case.
-Will