probe to track destinations of calls and branches

William Cohen wcohen@redhat.com
Tue Mar 29 19:06:00 GMT 2005


William Cohen wrote:
> Fleshing out another building block for instrumentation, tracking 
> destinations of branches and calls. The attached probe has a parameter 
> that is the address of the branch or call instruction be instrumented. 
> The probe records the destinations of the call or branch in a map. This 
> can be used to examine the destinations of indirect calls and jumps.
> 
> So I found out the address for the call for the syscall call from the 
> disassembled code:
> 
> c0103f1c <syscall_call>:
> c0103f1c:       ff 14 85 3c 7a 35 c0    call   *0xc0357a3c(,%eax,4)
> c0103f23:       89 44 24 18             mov    %eax,0x18(%esp)

I updated the code to reflect the Anath's correction to the pre_handler 
run logic and the updates to the runtime library.

This code is still x86 dependent because it directly accesses reg->eip 
for the program counter. Once there is something equivalent to 
curren_ret_addr() for the program counter this can be added to the 
probes in the runtime library.

Currently this code expects to be placed in src/runtime/probes/dest_branch.

-Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dest_branch.tar.gz
Type: application/x-tar
Size: 1893 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20050329/209dec44/attachment.tar>


More information about the Systemtap mailing list