This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Uprobes: howto calculate the probe offset


Hi Frank,
> 
> Could you explain why the uprobe.offset number is sometimes simply an
> intra-page offset (which kprobes could compute), and sometimes a
> mapping-relative one?

Normally the address specified for the applications are absolute,
hence we map the page that contains the probed address, and add just the
page offset to insert/remove probes.

> 
> Also, given that it's possible to map a shared library at different
> addresses within different processes, does the latter computation
> imply that a uprobe only works for exactly those threads that have the
> same shlib mapped at the same address?  What happens to other threads?

There will be only one on disk image and we put the probes based on
that. If the same image is mapped at different addresses, the offset will
remain the same, but we have to explicitly track all such maps and
insert/remove probes on them as well.

Thanks
Prasanna


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]