public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* problems displaying offsets...
@ 2010-05-18 20:07 Steve Dickson
  2010-05-20 20:12 ` David Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Dickson @ 2010-05-18 20:07 UTC (permalink / raw)
  To: SystemTAP

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?

tia,

steved.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problems displaying offsets...
  2010-05-18 20:07 problems displaying offsets Steve Dickson
@ 2010-05-20 20:12 ` David Smith
  2010-05-21 18:56   ` William Cohen
  0 siblings, 1 reply; 3+ messages in thread
From: David Smith @ 2010-05-20 20:12 UTC (permalink / raw)
  To: Steve Dickson; +Cc: SystemTAP

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?

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problems displaying offsets...
  2010-05-20 20:12 ` David Smith
@ 2010-05-21 18:56   ` William Cohen
  0 siblings, 0 replies; 3+ messages in thread
From: William Cohen @ 2010-05-21 18:56 UTC (permalink / raw)
  To: systemtap

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-21 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-18 20:07 problems displaying offsets Steve Dickson
2010-05-20 20:12 ` David Smith
2010-05-21 18:56   ` William Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).