This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Patch [1/3] Userspace probes new interfaces
- From: Prasanna S Panchamukhi <prasanna at in dot ibm dot com>
- To: "Zhang, Yanmin" <yanmin dot zhang at intel dot com>
- Cc: systemtap at sources dot redhat dot com, "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, "Mao, Bibo" <bibo dot mao at intel dot com>
- Date: Thu, 2 Feb 2006 14:57:07 +0530
- Subject: Re: Patch [1/3] Userspace probes new interfaces
- References: <99FA2ED298A9834DB1BF5DE8BDBF24130FD18A@pdsmsx403>
- Reply-to: prasanna at in dot ibm dot com
On Thu, Feb 02, 2006 at 03:31:05PM +0800, Zhang, Yanmin wrote:
> >>-----Original Message-----
> >>From: Prasanna S Panchamukhi [mailto:prasanna@in.ibm.com]
> >>Sent: 2006å1æ27æ 20:59
> >>To: Zhang, Yanmin
> >>Cc: systemtap@sources.redhat.com; Keshavamurthy, Anil S; Mao, Bibo
> >>Subject: Re: Patch [1/3] Userspace probes new interfaces
> >>
> >>Yanmin,
> >>
> >>> >>
> >>> >>Please check get_kprobe_user(), p.kp.addr it is used to distinguish
> >>> >>between kernel and user space probes.
> >>> I know get_kprobe_user uses it, but should the uprobe implementation assign an appropriate value to p.kp.addr? It's not good to ask
> >>the caller of register_uprobe to do so because the page might be not in memory or not been mapped into the address space of the process.
> >>
> >>Another aspect of assigning p.kp.addr, is that even the offset can be
> >>derieved from using the address. The user-space tool can read the
> >>application's elf section and symbol table to calculate the offset
> >>using the address as suggested by Roland.
> [YM] Your case is not good at a dynamic libs because they are position independent and can't be expected at a fixed address before being mapped into process address space.
I am referring to the address of the symbol as obtained through
utilities nm, objdump etc that work on object files and libraries on
disk before they are mapped in memory. Check Ulrich's mail for details
as how to calculate the offset.
http://sourceware.org/ml/systemtap/2006-q1/msg00228.html
Thanks
Prasanna
--
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-51776329