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: Patch [1/3] Userspace probes new interfaces


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


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