public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug kprobes/10482] New: First 3 $$parms not correct using module.function probes
@ 2009-08-05  2:45 david dot graham at intel dot com
  2009-08-05  3:14 ` [Bug translator/10482] " fche at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: david dot graham at intel dot com @ 2009-08-05  2:45 UTC (permalink / raw)
  To: systemtap

When I run any module.function probe, the first 3 $$parms are not correctly
reported. Interestingly, if there are more than 3 parameters, param4 and higher
are properly printed. The issue is most easily illustrated by showing (actual)
sample code, probe defintion, and output.
 
Here's the call in the probed module to the function that to be probed:
    igb_testfunc(1,2,3,4,5,6,7,8);

Here's the probe itself, which I am running in an .stp file:
    probe module("igb").function("igb_testfunc") {
         printf("%s %s\n",probefunc(),$$parms); }

And here is the output when this probe is hit:
    igb_testfunc p1=0xfffffffff884c200 p2=0xffffffffffffffff p3=0x0 p4=0x4
p5=0x5 p6=0x6 p7=0x7 p8=0x8

This is reproducible on the 2 systems I have available. One is 32bit x86, the
other 64bit. I am running kernel 2.6.31-rc2 built with the recommended CONFIG
settings. I think that I have noticed this on earlier kernels, but am not sure.

All probed functions are properly identified. $$return in return probes shows
the proper return codes.

It may be relevant that I am building my module out of the kernel tree, and in
order to get systemtap to work I manually place the built driver binary into
both the runtime and build locations.

/lib/modules/`uname -r`/kernel/drivers/net/igb/igb.ko
/lib/modules/`uname -r`/build/drivers/net/igb/igb.ko

Thanks for any help. Dave

-- 
           Summary: First 3 $$parms not correct using module.function probes
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: kprobes
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: david dot graham at intel dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10482

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10482] First 3 $$parms not correct using module.function probes
  2009-08-05  2:45 [Bug kprobes/10482] New: First 3 $$parms not correct using module.function probes david dot graham at intel dot com
@ 2009-08-05  3:14 ` fche at redhat dot com
  2009-08-05 16:29 ` david dot graham at intel dot com
  2009-08-05 16:37 ` david dot graham at intel dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2009-08-05  3:14 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-08-05 03:14 -------
Can you provide a disassembly of the affected function, as
well as readelf -w for it?  (An alternative for the latter would
be a systemtap build-tree run of loc2c-test against the same
module+address, but this is an undocumented diagnostic program.)

Is your kernel compiled with an unusual toolchain?  -mregparm=3
may be related.

I wouldn't expect it, but does println($p1) give a different dump
for $p1 than $$parms?  Does "stap -P ..." make a difference?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
          Component|kprobes                     |translator


http://sourceware.org/bugzilla/show_bug.cgi?id=10482

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10482] First 3 $$parms not correct using module.function probes
  2009-08-05  2:45 [Bug kprobes/10482] New: First 3 $$parms not correct using module.function probes david dot graham at intel dot com
  2009-08-05  3:14 ` [Bug translator/10482] " fche at redhat dot com
@ 2009-08-05 16:29 ` david dot graham at intel dot com
  2009-08-05 16:37 ` david dot graham at intel dot com
  2 siblings, 0 replies; 4+ messages in thread
From: david dot graham at intel dot com @ 2009-08-05 16:29 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From david dot graham at intel dot com  2009-08-05 16:28 -------
Thanks for such a fast response.

$println($p1) still printed the same as using $$params.
Yes ! When I ran with the -P option, all was well. 

I don't know about the toolchain & -mregparm=3, though I suspect that might be 
relevant too. Our Makefile is so complicated that its hard for me to see what 
its doing. I will attach assembly for the test function for the case where the 
decode wasn't working. 

I did find though, that if I ran "make CFLAGS_EXTRA=-Os" to optimize for size, 
the decode was also working for all parameters, even without using the -P 
option.

Thanks again. This is awesome stuff ! 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WORKSFORME


http://sourceware.org/bugzilla/show_bug.cgi?id=10482

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10482] First 3 $$parms not correct using module.function probes
  2009-08-05  2:45 [Bug kprobes/10482] New: First 3 $$parms not correct using module.function probes david dot graham at intel dot com
  2009-08-05  3:14 ` [Bug translator/10482] " fche at redhat dot com
  2009-08-05 16:29 ` david dot graham at intel dot com
@ 2009-08-05 16:37 ` david dot graham at intel dot com
  2 siblings, 0 replies; 4+ messages in thread
From: david dot graham at intel dot com @ 2009-08-05 16:37 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From david dot graham at intel dot com  2009-08-05 16:37 -------
Created an attachment (id=4113)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4113&action=view)
Assembly of function where first 3 of $$parms didn;t decode


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10482

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

end of thread, other threads:[~2009-08-05 16:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-05  2:45 [Bug kprobes/10482] New: First 3 $$parms not correct using module.function probes david dot graham at intel dot com
2009-08-05  3:14 ` [Bug translator/10482] " fche at redhat dot com
2009-08-05 16:29 ` david dot graham at intel dot com
2009-08-05 16:37 ` david dot graham at intel dot com

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).