Probe on function entry rather than the end of the prolog (s390x only)

David Wilder dwilder@us.ibm.com
Thu Feb 1 01:27:00 GMT 2007


I been looking into a problem on s390x that is prevalent when testing 
syscall tapset.  The problem is that stap can not locate the location of 
the 5th argument to functions we are placing probes on.

The root of the problem is that the dwarf location information is may 
not be available for function arguments at the address stap is 
identifying as the end of the function prolog.    The S390x API 
specifies that arguments are passed in the registers,  when using -o0 
all parameters are stored on the stack in the function prolog and the 
debug information points to the stack slots.  With optimization GCC 
removes these stores and it is mandatory to use the location lists to 
find a parameter.  Unfortunately with optimization turned on it is not 
possible anymore to to tell where the function prolog is finished and 
the function body starts since gcc may intermixes the prolog and the 
function body.   (thanks to Andreas Kerbbel for the above information).

However; the debug information to identify all the arguments at the 
function entry point looks to be correct.  Identifying the correct 
register for each argument.  This patch sets the probes point at the 
function entry point rather than the end of  the prolog to correct this 
issue (for s390x only)  Note: I just piggy backed on a similar change 
that was made for the ia64.

Comments?
 

-- 
David Wilder
IBM Linux Technology Center
Beaverton, Oregon, USA 
dwilder@us.ibm.com
(503)578-3789

-------------- next part --------------
A non-text attachment was scrubbed...
Name: s390x_probe_at_fuction_entry.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20070201/09f18ab9/attachment.bin>


More information about the Systemtap mailing list